Ensure database created on startup.
This commit is contained in:
parent
e863015075
commit
b1f99dc57a
@ -3,6 +3,8 @@ using EntityFrameworkCore.Domain;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
using var context = new DeadBallZoneLeagueDbContext();
|
||||
// context.Database.Migrate(); // Can be used to automatically migrate on run.
|
||||
context.Database.EnsureCreated();
|
||||
|
||||
// var teamOne = await context.Teams.FirstAsync(t => t.Id == 1);
|
||||
// var teamTwo = await context.Teams.FirstAsync(t => t.Id == 2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user