Be careful what you LINQ for: Mixing LINQ to SQL with LINQ to Entities

Wednesday, May 28, 2014

An exception I encountered today, led me to pay more attention about the differences between LINQ to SQL and LINQ to Entities. Here is what I learned; Imagine your in a school, and the students council has announced the winners in the school's yearly programming competition. We have a bunch of students, and the winners names. Let's get all the winning student, that's easy: using (var db = new School()) { //Create students list var students = new List<Student> { new Student { ID =...
no comments