Challonge Provider can create tournament

This commit is contained in:
2018-10-07 15:15:11 +02:00
parent 9a9d4c7053
commit 681deda3d2
17 changed files with 245 additions and 18 deletions

View File

@@ -21,12 +21,16 @@ namespace LaDOSE.Entity.Context
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<SeasonGame>()
.HasKey(t => new { t.SeasonId, t.GameId });
modelBuilder.Entity<EventGame>()
.HasKey(t => new { t.EventId, t.GameId });
modelBuilder.Entity<Event>()
.HasOne(s => s.Season)
.WithMany(p => p.Event)
.HasForeignKey(fk => fk.SeasonId);
modelBuilder.Entity<SeasonGame>()
.HasOne(pt => pt.Season)
.WithMany(p => p.Games)
@@ -37,6 +41,17 @@ namespace LaDOSE.Entity.Context
.WithMany(p => p.Seasons)
.HasForeignKey(pt => pt.GameId);
modelBuilder.Entity<EventGame>()
.HasOne(pt => pt.Event)
.WithMany(p => p.Games)
.HasForeignKey(pt => pt.EventId);
modelBuilder.Entity<EventGame>()
.HasOne(pt => pt.Game)
.WithMany(p => p.Events)
.HasForeignKey(pt => pt.GameId);
}
}