Most efficient query

2 posts, 0 answers
  1. Steve
    Steve avatar
    1851 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);

    or

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

  2. Jan Blessenohl
    Admin
    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.

    Regards,
    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!
  3. DevCraft banner
Back to Top