Basic raw SQL queries

The main idea of abstracting SQL queries from the framework is to perform implementation irrespective of the data source that we will be using in the application. We might think that creating raw SQL queries must be defeating the very purpose of EF Core's existence. There are a few valid requirements that might need raw SQL instead of leaving Entity to do the work for us.

It could be anything, something that could not be achieved through LINQ queries or performance that was not optimized by Entity-generated queries. The reason could be anything, but, at the end of the day, we all work for an outcome, an optimized outcome with better performance. We might be ready to take extreme measures in not aligning with the framework/APIs, ...

Get Mastering Entity Framework Core 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.