Max(IEnumerable`1,Func`2)' on the database server side currently not implemented

4 posts, 0 answers
  1. Goran
    Goran avatar
    2 posts
    Member since:
    Nov 2010

    Posted 14 Mar 2012 Link to this post

    I have an Order and OrderEquipment. Order has more OrderEquipments with different OrderStatuses.

    orderStatusList contains the list of (int) IDs of an OrderStatus according to which I want to filter my results. (I want to get the Order which maximum status of its OrderEquipments is in orderStatusList)

    When I run this code I get an error:

    Execution of 'System.Linq.Enumerable:Max(IEnumerable`1,Func`2)' on the database server side currently not implemented

    List<int> orderStatusList  = ...
       
    IQueryable<Order> orderList = (from o in Scope.Extent<Order>()
                          orderby o.OrderID ascending
                          select o);
      
    orderList = orderList.Where(o => orderStatusList.Contains(o.OrderEquipments.Max(e => e.OrderStatusID.Value)));
      
    return orderList.ToList();


    I tried changing the querry, but I get the same error also for functions Any or All. also, I tried with subqueries but then I get an error that the second Select is not implemented/supported

    Do you know maybe why is this happening?
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 15 Mar 2012 Link to this post

    Hello,

    OpenAccess  will contain support for those kind of subqueries in the next build. Thanks for reporting this shortcoming, your Telerik Points have been updated.

    All the best,
    Thomas
    the Telerik team
    Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
  3. DevCraft banner
  4. Ian
    Ian avatar
    26 posts
    Member since:
    Jun 2012

    Posted 20 Mar 2012 Link to this post

    Is there a PITS number for this?
  5. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 22 Mar 2012 Link to this post

    Hello Vernon,

    You can find the new PITS item here.

    Regards,
    Ivailo
    the Telerik team
    Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
Back to Top