Hello,
The case is following.
There is DataGrid in WPF app which consume IQueryable as ItemsSource (apply Filtering, Sorting, Grouping, Aggregations, etc...) we have MSSQL Server DB where the data is stored if from app we directly connect to DB using EF DbSet<> or ADO.NET Table<>
everything is work excellent. We do not want that app has direct access to DB and the purpose is to use WebAPI between them. The DataGrid has its own query generator expressions, the generated query is look like
.Call System.Linq.Queryable.Select(
.Call System.Linq.Queryable.GroupBy(
.Call System.Linq.Queryable.Select(
.Constant<Reports.ReportQuery>(Query(RepoService.Flight)),
'(.Lambda #Lambda1<System.Func`2[RepoService.Flight,DynamicClass1]>)),
'(.Lambda #Lambda2<System.Func`2[DynamicClass1,DynamicClass2]>)),
'(.Lambda #Lambda3<System.Func`2[System.Linq.IGrouping`2[DynamicClass2,DynamicClass1],Telerik.Pivot.Core.PivotResultItem]>))
As I understand OData is not suitable for our case. What we are trying to do is create our custom IQueryable and IQueryProvider get query expression in provider Execute method send it to WebAPI which then execute it on DB return result and return
that result form provider Execute method.
1) Is this way correct/possible?
2) Is there some existing solutions for this case?