Entity Framework Core Database First Approach – Build ASP.NET Core Razor Pages App using EF Core



Entity Framework Core Database First Approach – Build ASP.NET Core Razor Pages App using EF Core

Entity Framework Core Database First Approach - Build ASP.NET Core Razor Pages App using EF Core

Full ASP.NET Courses 🚀

👉 Build ASP.NET Core Web API – Scratch To Finish ( .NET 6)
https://www.udemy.com/course/build-rest-apis-with-aspnet-core-web-api-entity-framework/?couponCode=1299OCT22

👉 Build Amazing Apps With ANGULAR and ASP.NET Core REST API
https://www.udemy.com/course/real-world-app-angular-aspnet-core-web-api-and-sql/?couponCode=1299OCT22

👉 ASP.NET Core Razor Pages – Scratch to Finish (.NET 6)
https://www.udemy.com/course/aspnet-core-razor-pages-web-application-development/?couponCode=1299OCT22

In this video, we will make an ASP.NET Core Web Application using Razor pages and connect the application to a SQL server database using Entity Framework core database first technique.

💖 Subscribe to show support: https://bit.ly/2FAgXzS
☕ Buy me a coffee: https://www.buymeacoffee.com/SameerSaini

We would need to install the below NuGet packages for this video
Microsoft.Entityframeworkcore.SqlServer
Microsoft.Entityframeworkcore.Tools

Scaffolding Entity framework database in the ASP.NET core application

“Scaffold-DbContext “Server=(localdb)mssqllocaldb;Database=Blogging;Trusted_Connection=True;” Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models”

We will then change the connection to the database from the startup.cs file. We will use dependency injection to inject the DBContext and use it in the database services.

Comments are closed.