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
|
|
@ -17,6 +17,9 @@ namespace DataLayer.Configurations
|
|||
.Metadata
|
||||
.FindNavigation(nameof(Contributor.BooksLink))
|
||||
.SetPropertyAccessMode(PropertyAccessMode.Field);
|
||||
|
||||
// seeds go here. examples in Dinah.EntityFrameworkCore.Tests\DbContextFactoryExample.cs
|
||||
entity.HasData(Contributor.GetEmpty());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue