MireaBackend/SqlData/Persistence/Contexts/Schedule/SpecificWeekDbContext.cs

17 lines
695 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 SpecificWeekDbContext(DbContextOptions<SpecificWeekDbContext> options) : DbContext(options), ISpecificWeekDbContext
{
public DbSet<SpecificWeek> SpecificWeeks { get; set; } = null!;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new SpecificWeekConfiguration());
base.OnModelCreating(modelBuilder);
}
}