João Simões
Jul 29, 2023

--

In your first interface you are returning an IQueryable both in the GetAll and GetWithCondition so why the need for GetWithCondition if you can build any expression you want from the GetAll?

Unless you do the same you did in the async example, return an enumerated collection, you may as well just have a method Query, returning an IQueryable, and let whoever uses the repository to build the expression it needs.

--

--

João Simões
João Simões

Written by João Simões

Solutions Architect trying to solve world “problems”! Creator of https://code-corner.dev

Responses (1)