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

17 lines
725 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 LessonAssociationDbContext(DbContextOptions<LessonAssociationDbContext> options) : DbContext(options), ILessonAssociationDbContext
{
public DbSet<LessonAssociation> LessonAssociations { get; set; } = null!;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new LessonAssociationConfiguration());
base.OnModelCreating(modelBuilder);
}
}