Challonge Provider can create tournament
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user