фиксы
This commit is contained in:
parent
cda564870b
commit
414f66dbd0
@ -104,7 +104,13 @@ public class ApplicationContext : IdentityDbContext<User>
|
|||||||
public ApplicationContext(DbContextOptions<ApplicationContext> options)
|
public ApplicationContext(DbContextOptions<ApplicationContext> options)
|
||||||
: base(options)
|
: base(options)
|
||||||
{
|
{
|
||||||
Database.Migrate();
|
try{
|
||||||
|
Database.Migrate();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Database.EnsureCreated();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder builder)
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user