feat: add an interface for working with db set

This commit is contained in:
Polianin Nikita 2024-01-08 14:50:21 +03:00
parent 8028d40005
commit a389eb0a70
11 changed files with 98 additions and 0 deletions

View File

@ -12,4 +12,12 @@
<RootNamespace>$(AssemblyName)</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>
</Project>

View File

@ -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<Campus> Campuses { get; set; }
}

View File

@ -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<Day> Days { get; set; }
}

View File

@ -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<Faculty> Faculties { get; set; }
}

View File

@ -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<Group> Groups { get; set; }
}

View File

@ -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<LectureHall> LectureHalls { get; set; }
}

View File

@ -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<Lesson> Lessons { get; set; }
}

View File

@ -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<LessonToTypeOfOccupation> LessonToTypeOfOccupations { get; set; }
}

View File

@ -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<Professor> Professors { get; set; }
}

View File

@ -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<ProfessorToLesson> ProfessorToLessons { get; set; }
}

View File

@ -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<TypeOfOccupation> TypeOfOccupations { get; set; }
}