Create a DbContext class in Entity Framework Core

Publié le: 21 janvier 2024
sur la chaîne: Round The Code
16,678
157

🎯 Use Entity Framework Core to build real APIs with Minimal APIs:
👉 https://www.udemy.com/course/aspnet-c...

============

💻 Download the code example💻
👉 https://www.roundthecode.com/dotnet-c...

📖 Learn .NET and C# with our online courses 📖
👉 https://www.roundthecode.com/dotnet-c...

This tutorial will concentrate on setting up an Entity Framework DbContext class and SQL Server database for an ASP.NET Core Web API.

We'll show you how to install Visual Studio, the .NET SDK and LocalDB onto your machine.

From there, we will create the projects needed in Visual Studio and add the relevant EF Core NuGet packages.

Afterwards, we'll create the DbContext and the database that it's going to connect to and show you how you can check the database connection of a DbContext.

► This is part 1 of our Get started with EF Core course. View the full playlist:
   • Get started with EF Core - Full course  

► Connection string needed for the Web API
Server=(localdb)\\MSSQLLocalDB; Database=RoundTheCodeEFCore; Trusted_Connection=true; Trust Server Certificate=true; MultipleActiveResultSets=true; Integrated Security=true;

► Chapters
0:00 What we'll cover
0:13 Setup machine
1:48 Create projects in Visual Studio
3:20 Add Entity Framework NuGet packages
4:13 Create database
5:14 Create DbContext
6:00 Add DbContext to Web API
6:42 Test DbContext connection to the database
7:47 Learn more about EF Core

#efcore #entityframework #entityframeworkcore


Sur cette page du site, vous pouvez voir la vidéo en ligne Create a DbContext class in Entity Framework Core durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Round The Code 21 janvier 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 16,678 fois et il a aimé 157 téléspectateurs. Bon visionnage!