MireaBackend/Persistence/Contexts/Schedule/LessonAssociationDbContext.cs

17 lines
725 B
C#
Raw Normal View History

2024-01-08 16:51:57 +03:00
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;
2024-01-26 07:43:27 +03:00
public class LessonAssociationDbContext(DbContextOptions<LessonAssociationDbContext> options) : DbContext(options), ILessonAssociationDbContext
2024-01-08 16:51:57 +03:00
{
2024-01-26 07:43:27 +03:00
public DbSet<LessonAssociation> LessonAssociations { get; set; } = null!;
2024-01-08 16:51:57 +03:00
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
2024-01-26 07:43:27 +03:00
modelBuilder.ApplyConfiguration(new LessonAssociationConfiguration());
2024-01-08 16:51:57 +03:00
base.OnModelCreating(modelBuilder);
}
}