.NET IQueryable MSSQL and ASP.NET WebAPI RRS feed

  • Question

  • 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(
                '(.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?

    Thursday, September 27, 2018 9:03 PM

All replies

  • Hi Tuman_,

    This forum discuss and ask question about LINQ to SQL, since your issue is more relate to asp.net webapi, I would suggest that you could post your issue on asp.net webAPI forum suitable support.


    Thanks for your understanding and cooperation.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 28, 2018 7:25 AM