AWD-Lecture 03 DataBase Connection
AWD-Lecture 03 DataBase Connection
Net Core
Database connection
• "ConnectionStrings": {
• "StoreMISConnectionString":"server=ZIAPC;database=StoreDB;trusted_connection=true"
• }
Configuring Program.cs
Portion of Code for configuration sql server in program.cs:
• builder.Services.AddDbContext<StoreMISDBConnection>(options => {
•
options.UseSqlServer(builder.Configuration.GetConnectionString("StoreMISCon
nectionString"));
• });
Its your turn to ask about today’s lecture