c# - The type arguments for method cannot be inferred from the usage. Try specifying the type arguments ex - error. Any guidance? -
/// & lt; Summary & gt; /// Find all areas of parents without areas of children /// & lt; / Summary & gt; /// & lt; Returns & gt; Area filled with IQueryable Object & Lt; / Returns & gt; Public IQueryable FindParentAreas () {Returns db.Areas.SelectMany (x = & gt; x.ParentAreaID == Faucet); }
I want to return a collection of area objects which are basic areas, which means they have zero values in the parent array ID (in my database).
It seems that I can not compare it to tap because the meaning of zero in C # is something else in the Microsoft SQL Server.
Any guidance? Am I using SelectMany as well?
:
Each element projects an IEnumerable & lt; T & gt; And level the resulting sequence into a sequence.
:
Filters the sequence of values based on a predicate.
I think that you where
:
public IQueryable & lt; Region & gt; FindParentAreas () {returns db.Areas.Where (x => x.ParentAreaID == faucet); }
Comments
Post a Comment