From 2477d2b080874c9bb7aaa823ab616c61745bf1d2 Mon Sep 17 00:00:00 2001 From: Kevin Matsubara Date: Sun, 6 Apr 2025 11:34:53 +0200 Subject: [PATCH] Create new domain models for Match and League. --- EntityFrameworkCore.Data/DeadBallZoneLeagueDbContext.cs | 2 ++ EntityFrameworkCore.Domain/League.cs | 6 ++++++ EntityFrameworkCore.Domain/Match.cs | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100644 EntityFrameworkCore.Domain/League.cs create mode 100644 EntityFrameworkCore.Domain/Match.cs diff --git a/EntityFrameworkCore.Data/DeadBallZoneLeagueDbContext.cs b/EntityFrameworkCore.Data/DeadBallZoneLeagueDbContext.cs index a5b289c..7fdbf10 100644 --- a/EntityFrameworkCore.Data/DeadBallZoneLeagueDbContext.cs +++ b/EntityFrameworkCore.Data/DeadBallZoneLeagueDbContext.cs @@ -17,6 +17,8 @@ public class DeadBallZoneLeagueDbContext : DbContext } public DbSet Teams { get; set; } public DbSet Coaches { get; set; } + public DbSet Leagues { get; set; } + public DbSet Matches { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { diff --git a/EntityFrameworkCore.Domain/League.cs b/EntityFrameworkCore.Domain/League.cs new file mode 100644 index 0000000..14b0e7c --- /dev/null +++ b/EntityFrameworkCore.Domain/League.cs @@ -0,0 +1,6 @@ +namespace EntityFrameworkCore.Domain; + +public class League : BaseDomainModel +{ + +} diff --git a/EntityFrameworkCore.Domain/Match.cs b/EntityFrameworkCore.Domain/Match.cs new file mode 100644 index 0000000..359e964 --- /dev/null +++ b/EntityFrameworkCore.Domain/Match.cs @@ -0,0 +1,9 @@ +namespace EntityFrameworkCore.Domain; + +public class Match : BaseDomainModel +{ + public int HomeTeamId { get; set; } + public int AwayTeamId { get; set; } + public decimal TicketPrice { get; set; } + public DateTime Date { get; set; } +} \ No newline at end of file