This commit is contained in:
2018-10-06 14:56:56 +02:00
parent 5bb8ecb65b
commit 642d533a49

View File

@@ -26,12 +26,12 @@ namespace LaDOSE.Entity.Context
modelBuilder.Entity<SeasonGame>() modelBuilder.Entity<SeasonGame>()
.HasOne(pt => pt.Season) .HasOne(pt => pt.Season)
.WithMany(p => p.Games) .WithMany(p => p.Games)
.HasForeignKey(pt => pt.GameId); .HasForeignKey(pt => pt.SeasonId);
modelBuilder.Entity<SeasonGame>() modelBuilder.Entity<SeasonGame>()
.HasOne(pt => pt.Game) .HasOne(pt => pt.Game)
.WithMany(p => p.Seasons) .WithMany(p => p.Seasons)
.HasForeignKey(pt => pt.SeasonId); .HasForeignKey(pt => pt.GameId);
} }
} }