I have this code:
IEnumerable<string> q = customers .Select (c => c.Name.ToUpper()) .OrderBy (n => n)
To select an object, an ObjectContext actually creates an ObjectQuery that implements IQueryable. The object returned from ObjectQuery is not a normal object, but an EntityObject
but what if I write: (pay attention to var )
var q = customers .Select (c => c.Name.ToUpper()) .OrderBy (n => n)
it can be defined as ienumerable or iqueryable :
because ObjectQuery also implements ienumerable ...
I donβt know if there is any specific information that tells the compiler to "use A, not B. A is more specific ..." (should be ... I just can't find it)

any help? how will he know to use A || B
source share