diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-02-21 07:52:11 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-02-21 07:52:11 +0300 |
commit | 0107d5b518f586bc2172b4e89f0cab7619e76670 (patch) | |
tree | 60a93c8b8c9ebb2bef218280a2ee8d6f4e6a7019 /Program.cs | |
parent | 3c83f9f4b01b5965e04739e5f8accf3235f8f699 (diff) |
Add decription to figure model
Diffstat (limited to 'Program.cs')
-rw-r--r-- | Program.cs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,10 +5,10 @@ var builder = WebApplication.CreateBuilder(args); builder.Services.AddDbContext<DataContext>(opts => { - opts.UseSqlite(builder.Configuration["ConnectionStrings:MyDarlingDb"]); - opts.EnableSensitiveDataLogging(true); + opts.UseSqlite(builder.Configuration["ConnectionStrings:MyDarlingDb"]); + opts.EnableSensitiveDataLogging(true); }); -// builder.Services.AddSingleton<IRepository, MyDarlingRepository>(); + builder.Services.AddControllersWithViews(); var app = builder.Build(); @@ -17,7 +17,7 @@ app.UseStaticFiles(); app.MapControllers(); app.MapDefaultControllerRoute(); -// var context = app.Services.CreateScope().ServiceProvider.GetRequiredService<DataContext>(); -// SeedData.SeedDatabase(context); +var context = app.Services.CreateScope().ServiceProvider.GetRequiredService<DataContext>(); +SeedData.SeedDatabase(context); app.Run();
\ No newline at end of file |