Closed Kris-I closed 7 years ago
Hi @Kris-I ,
with the GetAll method you are retrieving all records from the database and then filter in memory, that is probably not what you want. You can use the Query method on the repository to pass in that filter so it is executed on the database. More info here : https://github.com/digipolisantwerp/dataaccess_aspnetcore#query.
Hello,
Is there an another solution than the classic on to right with your framework?
return customerRepo.GetAll().Where(x => x.Reference.ToLower() == reference.ToLower()).FirstOrDefault();
Thanks,