Duration 4:43

Database first approach in ASP .Net Core Web API

254 watched
0
8
Published 27 Sep 2023

Database first approach in ASP .Net Core Web API. Scaffold Command to Create Database:- Scaffold-DbContext "Server=YourServerName;Database=YourDatabaseName;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir YourFolderName appsetting.json file code:- "ConnectionStrings": { "YourEntitiesName": "server=YourServerName; database=YourDatabaseName;Trusted_Connection=True;" } Program.cs file Code:- ConfigurationManager Configuration = builder.Configuration; builder.Services.AddDbContext(anglebracketstart)YourContextClassName(anglebracketclose)(item =(anglebracketstart) item.UseSqlServer(Configuration.GetConnectionString("YourEntitiesName"))); Database first approach in entity framework in ASP .Net Core. Database first approach in entity framework in ASP .Net Core 6. ASP .Net Core 6 Web API entity framework code first. Database first approach in entity framework core. #csharp #webapi #api #code #visualstudio #database #sqlserver #sql #dotnetcore #dotnetprojects

Category

Show more

Comments - 0