Reputation: 743
Is there a performance difference between using a function inside a linq to sql select statement vs using an expression in EF core domain projection.
Ex.
context.Students.Select(x => StuddentDTOMapper(x)).ToList();
Vs.
context.Students.Select(StuddentDTOMapperExpression).ToList();
Upvotes: 2
Views: 71
Reputation: 588
I don't think so. But you can always check it on your own. I can tell you that you can gain a little performance boost by compiling your expressions. You can read about it more here and here.
Upvotes: 1