SES-65 #5
@ -20,30 +20,30 @@ namespace SessionCompanion.Database
|
||||
public virtual DbSet<User> Users { get; set; }
|
||||
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
builder.Entity<User>().HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Nickname = "Morwiec",
|
||||
Password = "123"
|
||||
},
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
builder.Entity<User>().HasData(
|
||||
s426135 marked this conversation as resolved
Outdated
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Nickname = "Cichoklepiec",
|
||||
Id = 1,
|
||||
Nickname = "Morwiec",
|
||||
Password = "123"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
Nickname = "Ruletka",
|
||||
Password = "123"
|
||||
}
|
||||
);
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Nickname = "Cichoklepiec",
|
||||
Password = "123"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 3,
|
||||
Nickname = "Ruletka",
|
||||
Password = "123"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
Przenieśmy to do osobnych plików, bo zacznie ię niedługo robić syfek jak ostatnio.