Lesson 15: Get Data From Database Using the Entity Framework in MVC Web APIs

Опубликовано: 20 Февраль 2026
на канале: Paul D. Sheriff
89
4

Lesson 15: Get Data From Database Using the Entity Framework in MVC Web APIs

Lesson Description
In this lesson you connect your MVC Web APIs to a SQL Server database using the Entity Framework to read a database table.

Content
Lesson Objectives 00:00
DEMO: Install the Entity Framework into your Project 00:23
DEMO: Add Data Annotations to Product Class 01:38
DEMO: Create DbContext Class and Add Connection String 03:26
DEMO: Add DbContext Class to DI Services 06:06
DEMO: Get Products from the SQL Server Table 07:33
DEMO: Get a Single Product from the SQL Server Table 08:48
Lesson Summary 09:45

You can get all the samples and hands-on labs for this course at https://www.pdsa.com/YouTube.

If you are interested in generating MVC Web API applications check out my FREE PDSC Developer Utilities at https://www.pdsa.com/Utilities.

#mvc #webapi #entityframework #ef #sqlserver #database #data #csharp #development #programming #dotnet #dotnetcore #dotnet6 #dotnet7 #dotnet8 #pauldsheriff #pluralsight #youtube

Paul.About()
Hello, my name is Paul D. Sheriff and I have a passion for teaching. I have been training developers for over 35 years through books, videos, article, blog posts, and international conferences and user groups.

Paul.Contact()
Website: https://www.pdsa.com
Email: [email protected]
LinkedIn:   / paulsheriff  
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff