c# - Apply oData filter on IQueryable throws ODataException Could not find property -


i'm using entity framework odata, having 2 classes this:

public class foo {     public virtual b b {get; set;} } public class b {     public int c {get; set;} } 

executing query dbset:

 var query = foos.where(x => x.id == 1) 

and having following odata : (b/c eq 3)

apply filter on iqueryable result (query):

filterqueryoption filter = new filterqueryoption(queryfilter, odataquerycontext); var q = filter.applyto(query, new odataquerysettings()); 

throws odataexception message: not find property named b on type foo

public class foo {      [foreignkey("b")]     public int c { get; set; }     public virtual b b { get; set; } } 

Comments