diff --git a/Persistence/Contexts/Schedule/CampusDbContext.cs b/Persistence/Contexts/Schedule/CampusDbContext.cs new file mode 100644 index 0000000..30a9d56 --- /dev/null +++ b/Persistence/Contexts/Schedule/CampusDbContext.cs @@ -0,0 +1,17 @@ +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 CampusDbContext(DbContextOptions options) : DbContext(options), ICampusDbContext +{ + public DbSet Campuses { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new CampusConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/DayDbContext.cs b/Persistence/Contexts/Schedule/DayDbContext.cs new file mode 100644 index 0000000..2edbb3a --- /dev/null +++ b/Persistence/Contexts/Schedule/DayDbContext.cs @@ -0,0 +1,17 @@ +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 options) : DbContext(options), IDayDbContext +{ + public DbSet Days { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new DayConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/FacultyDbContext.cs b/Persistence/Contexts/Schedule/FacultyDbContext.cs new file mode 100644 index 0000000..ab6a45c --- /dev/null +++ b/Persistence/Contexts/Schedule/FacultyDbContext.cs @@ -0,0 +1,17 @@ +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 FacultyDbContext(DbContextOptions options) : DbContext(options), IFacultyDbContext +{ + public DbSet Faculties { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new FacultyConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/GroupDbContext.cs b/Persistence/Contexts/Schedule/GroupDbContext.cs new file mode 100644 index 0000000..5d61c70 --- /dev/null +++ b/Persistence/Contexts/Schedule/GroupDbContext.cs @@ -0,0 +1,17 @@ +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 GroupDbContext(DbContextOptions options) : DbContext(options), IGroupDbContext +{ + public DbSet Groups { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new GroupConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/LectureHallDbContext.cs b/Persistence/Contexts/Schedule/LectureHallDbContext.cs new file mode 100644 index 0000000..67841a1 --- /dev/null +++ b/Persistence/Contexts/Schedule/LectureHallDbContext.cs @@ -0,0 +1,17 @@ +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 LectureHallDbContext(DbContextOptions options) : DbContext(options), ILectureHallDbContext +{ + public DbSet LectureHalls { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new LectureHallConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/LessonDbContext.cs b/Persistence/Contexts/Schedule/LessonDbContext.cs new file mode 100644 index 0000000..d2dfcae --- /dev/null +++ b/Persistence/Contexts/Schedule/LessonDbContext.cs @@ -0,0 +1,17 @@ +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 LessonDbContext(DbContextOptions options) : DbContext(options), ILessonDbContext +{ + public DbSet Lessons { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new LessonConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/LessonToTypeOfOccupationDbContext.cs b/Persistence/Contexts/Schedule/LessonToTypeOfOccupationDbContext.cs new file mode 100644 index 0000000..1aada5e --- /dev/null +++ b/Persistence/Contexts/Schedule/LessonToTypeOfOccupationDbContext.cs @@ -0,0 +1,17 @@ +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 LessonToTypeOfOccupationDbContext(DbContextOptions options) : DbContext(options), ILessonToTypeOfOccupationDbContext +{ + public DbSet LessonToTypeOfOccupations { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new LessonToTypeOfOccupationConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/ProfessorDbContext.cs b/Persistence/Contexts/Schedule/ProfessorDbContext.cs new file mode 100644 index 0000000..fcd51c6 --- /dev/null +++ b/Persistence/Contexts/Schedule/ProfessorDbContext.cs @@ -0,0 +1,17 @@ +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 ProfessorDbContext(DbContextOptions options) : DbContext(options), IProfessorDbContext +{ + public DbSet Professors { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new ProfessorConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/ProfessorToLessonDbContext.cs b/Persistence/Contexts/Schedule/ProfessorToLessonDbContext.cs new file mode 100644 index 0000000..1673b68 --- /dev/null +++ b/Persistence/Contexts/Schedule/ProfessorToLessonDbContext.cs @@ -0,0 +1,17 @@ +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 ProfessorToLessonDbContext(DbContextOptions options) : DbContext(options), IProfessorToLessonDbContext +{ + public DbSet ProfessorToLessons { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new ProfessorToLessonConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/Contexts/Schedule/TypeOfOccupationDbContext.cs b/Persistence/Contexts/Schedule/TypeOfOccupationDbContext.cs new file mode 100644 index 0000000..b47ac61 --- /dev/null +++ b/Persistence/Contexts/Schedule/TypeOfOccupationDbContext.cs @@ -0,0 +1,17 @@ +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 TypeOfOccupationDbContext(DbContextOptions options) : DbContext(options), ITypeOfOccupationDbContext +{ + public DbSet TypeOfOccupations { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new TypeOfOccupationConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file