I have the following code on DataContext:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration<CollectionSite>(new CollectionSiteMap());
modelBuilder.ApplyConfiguration<TestOrderAlcoholResult>(new TestOrderAlcoholResultMap());
//.... other configurations
modelBuilder.Entity<ButtonStyle>().HasData(new ButtonStyle()
{
Label = "Sharp edges",
Style = "border-radius: 0",
IsDefault = true,
Id = 1
});
modelBuilder.Entity<ColorScheme>().HasData(new ColorScheme()
{
Primary = "#a21521",
Secondary = "#fcf7f8",
Text = "#ced3dc",
Background = "#4e8097",
Shade = "#90c2e6",
IsDefault = true,
Id = 1
});
//.... seed other data
base.OnModelCreating(modelBuilder);
}
but data is not added to tables after update-database
. What is wrong?