Most efficient query

Thread is closed for posting
2 posts, 0 answers
  1. Steve
    Steve avatar
    1886 posts
    Member since:
    Dec 2008

    Posted 26 Aug 2012 Link to this post

    Hey Guys,
      Quick question on what's the optimal way to query OA here...or is this the same thing

    from w in item.Weights
    select new WeightModel(w);


    var items = context.Weights;
    foreach(item in items)
       results.Add(new WeightModel(item));

  2. Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 27 Aug 2012 Link to this post

    Hello Steve,

    exactly the same effort, in the first example the loop is done by Linq, in the second you do it.

    Jan Blessenohl
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top