Solution
- Use builder.Configuration in the code and Nuget Package for Microsoft.Extensions.Configuration
using Microsoft.Extensions.Configuration;
builder.Services.AddDbContext<ApplicationDbContext>(options =>
{
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection"));
});
No comments:
Post a Comment