Compiled queries in Entity Framework Core 2.0

added by DotNetKicks
1/9/2018 8:09:33 AM

2 Kicks, 381 Views

Entity Framework Core 2.0 introduces explicitly compiled queries. These are LINQ queries that are compiled in advance to be ready for execution as soon as application asks for data. This blog post demonstrates how compiled queries work and how to use them. Suppose we have database context class with method to return category by id.