фиксы
This commit is contained in:
1 parent
cda564870b
commit
414f66dbd0
1 file changed
+7
-1
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user