Saturday, June 28, 2014

filter using list proprty

Entity Framework? If you have a DbContext named MyContext that has a DbSet named Customers, you would define a query that retrieves all Customer entities like this:



using(var context = new MyContext())
{
var customers = (from c in _context.Customers);
}



But since the code you have posted doesn't use any context though I am not really sure what your issue is? Your code uses LINQ to Object rather than LINQ to entities and Entity Framework is not involved. Also, the IQueryable<T> interface implements the IEnumerable<T> interface.


No comments:

Post a Comment