Simple question:
Part of my repository looks like this
public class CustomerRepository : IRepository<Customer>
{
public IQueryable<Customer> GetAll()
{
MyDataEntities ent = new MyDataEntities();
return from c in ent.Customers select c;
}
}
Now lets say I have 10,000 customers, and if I do this:
var cus = from c in GetAll() where c.FirstName == "jon" select c;
Please tell me that GetAll() wont load all those 10,000 but lazy load the whole thing? Is it something I need to set somewhere or does it happen automatically?
I wouldn't also know how to check if it is lazy loaded, is there something to see when the actual sql query was spit into sql server?
Sorry about the ignorance.