Will adding partial class properties ruin deferred execution?
If I add properties onto a linq entity (employees for example), that simply refer to other properties to implement an interface, return an IQueryable, and the where clause mentions those added properties that just point to other linq entity properties, will it cause the entire table to be loaded and filtered in memory instead of at the sql server?
my database uses lower case fields, linq to sql pulls this in and wants to use lower case properties on the entity, I use resharper and prefer to stick t开发者_如何学运维o the convention of UpperCamelCase for public properties.
If the query in your property accepts IQueryable as a parameter and returns IQueryable, and there are no conversions to/from IEnumerable or ICollection before the return, the query will not be executed in the property. It will be extended, and the actual execution will occur at the moment of casting to IEnumerable etc.
精彩评论