This is a migrated thread and some comments may be shown as answers.

Most efficient query

1 Answer 32 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 27 Aug 2012, 01:24 AM
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));

1 Answer, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 27 Aug 2012, 12:34 PM
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!
Tags
Development (API, general questions)
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Jan Blessenohl
Telerik team
Share this question
or