forked from SoDOff-Project/sodoff
Compare commits
No commits in common. "28adf1b3f1c486493b2d61155340a668af1003f1" and "9f149cedb31105d533df8658f6157d699a4f43ff" have entirely different histories.
28adf1b3f1
...
9f149cedb3
@ -7,7 +7,6 @@ using sodoff.Services;
|
|||||||
using sodoff.Utils;
|
using sodoff.Utils;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@ -65,13 +64,6 @@ using var scope = app.Services.CreateScope();
|
|||||||
|
|
||||||
scope.ServiceProvider.GetRequiredService<DBContext>().Database.EnsureCreated();
|
scope.ServiceProvider.GetRequiredService<DBContext>().Database.EnsureCreated();
|
||||||
|
|
||||||
// ensure any new migrations are applied
|
|
||||||
var migrations = scope.ServiceProvider.GetRequiredService<DBContext>().Database.GetPendingMigrations();
|
|
||||||
|
|
||||||
if (migrations != null)
|
|
||||||
// apply them
|
|
||||||
await scope.ServiceProvider.GetRequiredService<DBContext>().Database.MigrateAsync();
|
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
|
|
||||||
if (assetServer)
|
if (assetServer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user