Querying EF Core Model
Learn how to query the Northwind database using Entity Framework Core and LINQ.
We'll cover the following
Querying from the Northwind database
Now that we have a model that maps to the Northwind database and two of its tables, we can write some simple LINQ queries to fetch data. Now, write the code and view the results:
Step 1: Add a new class file named Program.Helpers.cs
.
Step 2: In Program.Helpers.cs
, add a partial Program
class with a SectionTitle
method, as shown in the following code:
Get hands-on with 1400+ tech skills courses.