Did you know that the following code will work:
The IQueryable<Entity>
will attempt to load the entire query result into memory when enumerated.
I prefer to use the ToList()
method to actually hit the database. In my opinion it’s a lot clearer than the example above.
Make sure to read the following documentation about EF Core if you’re interested in performance!
Enjoy!