Thread is closed for posting
2 posts, 0 answers
  1. amir sherafatian
    amir sherafatian avatar
    42 posts
    Member since:
    Aug 2009

    Posted 29 Sep 2009 Link to this post

    i use this code to get max :
    public int MaxDCGroups()
        return scope.Extent<DCGroup>().Max(u => u.Id);
    but i think this code at first fecth all the records of my DCGroup table and then get max,
    i dont want fetch all records for get max , i want a query that execute on mssqlserver and return a one record that is the max in my table
    what can i do for this and other same cases like count and min ?
  2. Zoran
    Zoran avatar
    534 posts

    Posted 30 Sep 2009 Link to this post

    Hi amir sherafatian,

    Yes you are right, these kind of queries are not fully processed on the database server in the current official version of OpenAccess. However there have been a lot of Linq improvements on our product lately and pushing Min,Max,Count etc. to the server are part of those. You will be able to use this functionality as soon as the next official OpenAccess release or internal build. Thank you for your patience.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top