feat: add an interface for working with db set
This commit is contained in:
parent
8028d40005
commit
a389eb0a70
@ -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>
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
@ -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; }
|
||||
}
|
Loading…
Reference in New Issue
Block a user