EF: move seed data into corresponding config class
This commit is contained in:
parent
3f6689d032
commit
d098be8b03
3 changed files with 6 additions and 9 deletions
|
|
@ -9,6 +9,9 @@ namespace DataLayer.Configurations
|
|||
{
|
||||
entity.HasKey(c => c.CategoryId);
|
||||
entity.HasIndex(c => c.AudibleCategoryId);
|
||||
|
||||
// seeds go here. examples in Dinah.EntityFrameworkCore.Tests\DbContextFactoryExample.cs
|
||||
entity.HasData(Category.GetEmpty());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue