SES-65 #5

Merged
s426134 merged 5 commits from SES-65 into master 2020-12-03 18:36:39 +01:00
Showing only changes of commit d59c20bd0b - Show all commits

View File

@ -20,30 +20,30 @@ namespace SessionCompanion.Database
public virtual DbSet<User> Users { get; set; } public virtual DbSet<User> Users { get; set; }
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
}
protected override void OnModelCreating(ModelBuilder builder) protected override void OnModelCreating(ModelBuilder builder)
{ {
base.OnModelCreating(builder); base.OnModelCreating(builder);
builder.Entity<User>().HasData( builder.Entity<User>().HasData(
new
{
Id = 1,
Nickname = "Morwiec",
Password = "123"
},
new new
{ {
Id = 2, Id = 1,
Nickname = "Cichoklepiec", Nickname = "Morwiec",
Password = "123" Password = "123"
}, },
new new
{ {
Id = 3, Id = 2,
Nickname = "Ruletka", Nickname = "Cichoklepiec",
Password = "123" Password = "123"
} },
); new
{
Id = 3,
Nickname = "Ruletka",
Password = "123"
}
);
}
} }
} }