From the course: Building Web APIs with ASP.NET Core 8
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Using entity framework core
From the course: Building Web APIs with ASP.NET Core 8
Using entity framework core
- [Instructor] After creating the model classes, the next step will be to add Entity Framework Core to the project, we are using Microsoft's object relational mapper, or OR mapper, to talk to the database, which will provide us with an API to work with a data store, and we don't have to write any SQL ourselves. Entity Framework Core does all of the magic. And then, we just need to make sure that Entity Framework Core knows about our model classes, and then the OR mapper does everything automatically for us. Please note that Entity Framework Core is beyond the scope of this course, so I'll tell you exactly what you need to know, but for any other questions that go more in depth, and for all of the background information, I can only refer you to the excellent Entity Framework Core content in the LinkedIn Learning Library. But now, over to Visual Studio, where we could just go to Manage NuGet Packages, and then browse all available packages, and then install Entity Framework Core and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Controllers and actions7m 50s
-
(Locked)
Routing basics6m 14s
-
(Locked)
Creating a data model5m 54s
-
(Locked)
Using entity framework core7m 28s
-
(Locked)
Returning a list of items4m 4s
-
(Locked)
Using ActionResult2m 44s
-
(Locked)
Returning an item4m 29s
-
(Locked)
Handling errors3m 5s
-
(Locked)
Making the API asynchronous2m 51s
-
(Locked)
Working with minimal APIs5m 22s
-
(Locked)
Challenge: Searching items31s
-
(Locked)
Solution: Searching items3m 1s
-
(Locked)
-
-