Ambiguous Invocation IQueryable or IEnumerable

entity-framework linq

Question

I created a context and am going to ask a straightforward question.

var result = db.Set.Where(x => x.Id == num).Select(whatever);

and the red squiggly under there won't go away.Where expressing dissatisfaction with an unclear invocation betweenSystem.Collections.Generic.IEnumerable and System.Linq.IQueryable.System.Linq is mentioned specifically, andSystem.Collections.Generic is never mentioned in the project. How can I specify the code I wish to use?System.Linq.IQueryable ?

1
29
3/16/2019 6:00:13 AM

Accepted Answer

Got it. This solution addressed the issue I had outlined in my query, but it doesn't seem to be popular.

db.Set.AsQueryable().Where(...
0
1/30/2015 8:03:32 PM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow