Загрузка...

Insert, update & delete a record in Entity Framework Core

Learn how use CRUD to insert, update and delete an entity from a database using Entity Framework.

This tutorial will focus on using a DbContext to modify and change data through endpoints created in an ASP.NET Core Web API using C#.

We'll run the endpoints and show you the SQL Server database table records to verify that the CRUD operation has been a success.

We'll also show how you can use EF Core to validate and ensure that a record can only be updated or deleted if it exists.

► This is part 3 of our Get started with EF Core course. View the full playlist:
https://www.youtube.com/playlist?list=PLNLqfquXi7rsBWpRbEllsPcLLikcZEdmV

💻 Download the code example💻
https://www.roundthecode.com/dotnet-code-examples/get-started-with-entity-framework-core?utm_source=youtube&utm_medium=referral&utm_campaign=QM91e2wIPWg+-+video+content+%28code+example%29

📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-courses?utm_source=youtube&utm_medium=referral&utm_campaign=QM91e2wIPWg+-+video+content+%28online+course%29

👨‍💻Take our .NET and C# coding challenges👨‍💻
https://www.roundthecode.com/dotnet-coding-challenges?utm_source=youtube&utm_medium=referral&utm_campaign=QM91e2wIPWg+-+video+content+%28coding+challenges%29

► Chapters
0:00 What we'll cover
0:12 Create an insert, update model
0:51 Create a service to insert an entity
3:31 Create a Web API controller to insert an entity
5:32 Insert an entity through a Web API endpoint
6:05 Modify the service to update an entity
7:33 Modify the Web API controller to update an entity
8:32 Update an entity through a Web API endpoint
9:44 Add a Remove record to the DbContext interface
10:06 Modify the service to delete an entity
11:00 Modify the Web API controller to delete an entity
11:39 Delete an entity through a Web API endpoint
11:57 Learn more about EF Core

#efcore #entityframework #entityframeworkcore

Видео Insert, update & delete a record in Entity Framework Core канала Round The Code
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять