From a389eb0a707c40a6e914d4f1aa5f76bbc98e774b Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Mon, 8 Jan 2024 14:50:21 +0300 Subject: [PATCH] feat: add an interface for working with db set --- Application/Application.csproj | 8 ++++++++ .../Interfaces/DbContexts/Schedule/ICampusDbContext.cs | 9 +++++++++ .../Interfaces/DbContexts/Schedule/IDayDbContext.cs | 9 +++++++++ .../Interfaces/DbContexts/Schedule/IFacultyDbContext.cs | 9 +++++++++ .../Interfaces/DbContexts/Schedule/IGroupDbContext.cs | 9 +++++++++ .../DbContexts/Schedule/ILectureHallDbContext.cs | 9 +++++++++ .../Interfaces/DbContexts/Schedule/ILessonDbContext.cs | 9 +++++++++ .../Schedule/ILessonToTypeOfOccupationDbContext.cs | 9 +++++++++ .../DbContexts/Schedule/IProfessorDbContext.cs | 9 +++++++++ .../DbContexts/Schedule/IProfessorToLessonDbContext.cs | 9 +++++++++ .../DbContexts/Schedule/ITypeOfOccupationDbContext.cs | 9 +++++++++ 11 files changed, 98 insertions(+) create mode 100644 Application/Interfaces/DbContexts/Schedule/ICampusDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/IDayDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/IFacultyDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/IGroupDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/ILectureHallDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/ILessonDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/ILessonToTypeOfOccupationDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/IProfessorDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/IProfessorToLessonDbContext.cs create mode 100644 Application/Interfaces/DbContexts/Schedule/ITypeOfOccupationDbContext.cs diff --git a/Application/Application.csproj b/Application/Application.csproj index 76e4455..c03a6c1 100644 --- a/Application/Application.csproj +++ b/Application/Application.csproj @@ -12,4 +12,12 @@ $(AssemblyName) + + + + + + + + \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/ICampusDbContext.cs b/Application/Interfaces/DbContexts/Schedule/ICampusDbContext.cs new file mode 100644 index 0000000..40cd23b --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/ICampusDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface ICampusDbContext : IDbContextBase +{ + DbSet Campuses { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/IDayDbContext.cs b/Application/Interfaces/DbContexts/Schedule/IDayDbContext.cs new file mode 100644 index 0000000..f34d77a --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/IDayDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface IDayDbContext : IDbContextBase +{ + DbSet Days { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/IFacultyDbContext.cs b/Application/Interfaces/DbContexts/Schedule/IFacultyDbContext.cs new file mode 100644 index 0000000..166c5cc --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/IFacultyDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface IFacultyDbContext : IDbContextBase +{ + DbSet Faculties { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/IGroupDbContext.cs b/Application/Interfaces/DbContexts/Schedule/IGroupDbContext.cs new file mode 100644 index 0000000..1fb85d7 --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/IGroupDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface IGroupDbContext : IDbContextBase +{ + DbSet Groups { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/ILectureHallDbContext.cs b/Application/Interfaces/DbContexts/Schedule/ILectureHallDbContext.cs new file mode 100644 index 0000000..04f1a37 --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/ILectureHallDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface ILectureHallDbContext : IDbContextBase +{ + DbSet LectureHalls { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/ILessonDbContext.cs b/Application/Interfaces/DbContexts/Schedule/ILessonDbContext.cs new file mode 100644 index 0000000..b29561a --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/ILessonDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface ILessonDbContext : IDbContextBase +{ + DbSet Lessons { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/ILessonToTypeOfOccupationDbContext.cs b/Application/Interfaces/DbContexts/Schedule/ILessonToTypeOfOccupationDbContext.cs new file mode 100644 index 0000000..0dacc7e --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/ILessonToTypeOfOccupationDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface ILessonToTypeOfOccupationDbContext : IDbContextBase +{ + DbSet LessonToTypeOfOccupations { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/IProfessorDbContext.cs b/Application/Interfaces/DbContexts/Schedule/IProfessorDbContext.cs new file mode 100644 index 0000000..bb4b0d7 --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/IProfessorDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface IProfessorDbContext : IDbContextBase +{ + DbSet Professors { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/IProfessorToLessonDbContext.cs b/Application/Interfaces/DbContexts/Schedule/IProfessorToLessonDbContext.cs new file mode 100644 index 0000000..ba6aba5 --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/IProfessorToLessonDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface IProfessorToLessonDbContext : IDbContextBase +{ + DbSet ProfessorToLessons { get; set; } +} \ No newline at end of file diff --git a/Application/Interfaces/DbContexts/Schedule/ITypeOfOccupationDbContext.cs b/Application/Interfaces/DbContexts/Schedule/ITypeOfOccupationDbContext.cs new file mode 100644 index 0000000..0c18dfa --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/ITypeOfOccupationDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface ITypeOfOccupationDbContext : IDbContextBase +{ + DbSet TypeOfOccupations { get; set; } +} \ No newline at end of file