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:
• Get started with EF Core - Full course
💻 Download the code example💻
https://www.roundthecode.com/dotnet-c...
📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...
👨💻Take our .NET and C# coding challenges👨💻
https://www.roundthecode.com/dotnet-c...
► 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 04 Февраль 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,697 раз и оно понравилось 26 людям.