Core IQueryable vs IEnumerable Entity Framework Core - Basic Query In the first block, x => x.Age > 18 is an anonymous method (Func<Person, bool>), which can be executed like any other method. Enumerable.Where will execute the method once for each person, yielding values for which the method returned true.
The topic described in this article is a part of my Specification Pattern in C# Pluralsight course. Specification pattern is not a new topic, there are many of its implementations on the Internet already. In this post, I'd like to discuss the use cases for the pattern and compare several common implementations to each other. 1.For .NET Core 3.1 support, be sure to have the 2019 version of the IDE. APIs put a layer of separation between clients and the database, so the data is an excellent place to start. To keep data access trivial, Entity Framework has an in-memory alternative so that I can focus on the API itself.
since you do ToListAsync it becomes List<TodoItemDetailDTO>. don't forget if you just return IQueryable then the query to the database is not yet executed. until you access the data or do ToList. I am explaining this because you need to understand what you need to fix what you have.