//add
builder.Services.AddDbContext(options => options.UseSqlServer(
builder.Configuration.GetConnectionString(\"DefaultConnection\")
));
var app = builder.Build();
just put database connection code before build the app then this problem will be solved.
0 Comments
Leave a Comment