ConnectionString in appsettings.json: Use in Entity Framework Core for SQL Server

Publicado el: 09 octubre 2022
en el canal de: Round The Code
12,983
119

A connection string can be set in appsettings.json so a .NET application can integrate with SQL Server.

We'll show you how to set up a connection string in appsettings.json so it can be read in an ASP.NET Core web app.

The ConnectionString section can also be used with Entity Framework Core to communicate with a database.

As a result, it allows Entity Framework to be used in different parts of an application, such as a controller in a Web API, or in an MVC application.

We'll show you how to integrate EF Core with appsettings.json so it can communicate with SQL Server through a connection string. Our example will read data from the database, which will be shown with the output of a query from the DbContext.

This is part 2 of our appsettings.json course. The full playlist is here:
   • AppSettings.json course  

💻 Download the code example for this demo 💻
https://www.roundthecode.com/dotnet-c...

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

► Chapters
0:00 How ConnectionString is used in AppSettings.json
0:25 Learn .NET with our online courses
0:35 Add ConnectionString to AppSettings.json
0:55 SQL Server database used for example
1:11 Entity Framework DbContext setup
1:49 Add DbContext to Program.cs
2:55 Read the DbContext in an ASP.NET Core Web API
4:39 Preview of next part

#appsettings #connectionstring #entityframework


En esta página del sitio puede ver el video en línea ConnectionString in appsettings.json: Use in Entity Framework Core for SQL Server de Duración hora minuto segunda en buena calidad , que subió el usuario Round The Code 09 octubre 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 12,983 veces y le gustó 119 a los espectadores. Disfruta viendo!