Authorised Territory code examples - This #entityframework core 8 #tutorial shows how to use a class that is not part of the database context with Sql query in a console app.
First, we install EF Core 7 and create a class that is unmapped, it does not represent a table and not in the context.
Next, we write SQL query to retrieve data using SqlQuery.
The application is executed and it throws an error.
Finally, we upgrade Entity Framework to version 8 and run the app again to see results of the query.