diff options
Diffstat (limited to 'Models/DataContext.cs')
-rw-r--r-- | Models/DataContext.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Models/DataContext.cs b/Models/DataContext.cs index 50adf12..c874420 100644 --- a/Models/DataContext.cs +++ b/Models/DataContext.cs @@ -15,6 +15,11 @@ namespace MyDarling.Models opts.UseSqlite(configuration.GetConnectionString("MyDarlingDb")); } + protected override void OnModelCreating(ModelBuilder builder) + { + builder.Entity<UnderwearBundle>().HasMany(b => b.Figures).WithOne(); + } + public DbSet<UnderwearBundle> UnderwearBundles => Set<UnderwearBundle>(); public DbSet<Figure> Figures => Set<Figure>(); } |