-
Notifications
You must be signed in to change notification settings - Fork 164
Description
I'm using EFCoreRepository
I tried selector with GetAll and FindAll, but it seems that it does not work. It always creates SQL query with all columns, instead of selector specific columns.
Even simple example like this
var test = GetAll(x=>x.Id)
or
var test = FindAll(selector: selector=>selector.Id)
query all columns, instead of just Id column value.
Looks like selector is selecting from memory, and not from database. Is this true?
How can I make projections with SharpRepository so that my generated sql query contains only selected columns?
Did I skip some configuration steps?
EDIT
I did some investigation. It seems that this commit broke the functionality c082ae65#diff-d24380b902ea13a619155432be3b7b18L289
Select is now IEnumerable, instead of IQueryable
Previuos code
Why is this query Compiled?
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ef/language-reference/compiled-queries-linq-to-entities
I think this should be used https://cmatskas.com/improve-ef-core-performance-with-compiled-queries/

