HighwayFramework / Highway.Data

The fastest and smoothest way to great architecture

Home Page:http://hwyfwk.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scalar<List<People>> vs Query<People>

opened this issue · comments

I see in the documentation that it says to use Query for returning a list of objects, but I was wondering if using Scalar<List> has an down falls vs Query?

If you use Query it will not break deferred execution the way a List return from Scalar would. I would recommend using Query. If you want it to execute immediately then Scalar or .ToList() from Query would be the way to do that.