Samlar ihop och visar poäng från databasen
This commit is contained in:
@ -14,6 +14,8 @@ public class DataContext : DbContext
|
||||
public DbSet<GamePoint> GamePoints { get; set; }
|
||||
public DbSet<GameRound> GameRounds { get; set; }
|
||||
|
||||
public DbSet<RoundBuilderElement> RoundBuilderElements { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
@ -33,7 +35,7 @@ public class DataContext : DbContext
|
||||
new GamePoint { GamePointId = 3, ParticipantId = 3, GameRoundId = 2, GameDate = new DateTime(2025, 10, 15, 20, 12, 15), GameRoundRegNr = 2, GameRegPoints = 1000 },
|
||||
new GamePoint { GamePointId = 4, ParticipantId = 3, GameRoundId = 2, GameDate = new DateTime(2025, 10, 15, 20, 20, 15), GameRoundRegNr = 4, GameRegPoints = 400 }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<RoundBuilderElement>().HasNoKey();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user