MireaBackend/Persistence/Contexts/Schedule/DayDbContext.cs

17 lines
641 B
C#

using Microsoft.EntityFrameworkCore;
using Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule;
using Mirea.Api.DataAccess.Domain.Schedule;
using Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
namespace Mirea.Api.DataAccess.Persistence.Contexts.Schedule;
public class DayDbContext(DbContextOptions<DayDbContext> options) : DbContext(options), IDayDbContext
{
public DbSet<Day> Days { get; set; } = null!;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new DayConfiguration());
base.OnModelCreating(modelBuilder);
}
}