Files
chapter-organizer/Data/AppDbContext.cs
T
poprhythm 3a809f18a6 Add EventOccurrence entity and update DbContext
Created the EventOccurrence entity with properties for event details and added it to the AppDbContext. Updated the model snapshot to reflect the new entity and its relationships, ensuring proper database schema generation.
2025-12-27 15:59:48 -05:00

29 lines
807 B
C#

using System.Reflection;
using Core.Entities;
using Microsoft.EntityFrameworkCore;
namespace Data
{
public class AppDbContext : DbContext
{
public DbSet<EventDefinition> Events { get; set; }
public DbSet<Student> Students { get; set; }
public DbSet<Team> Teams { get; set; }
public DbSet<StudentEventRanking> StudentEventRanking { get; set; }
public DbSet<EventOccurrence> EventOccurrences { get; set; }
public AppDbContext()
{
}
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
}
}
}