feat: разделение на repository - services

This commit is contained in:
Mikhail Trubnikov
2026-04-14 09:56:31 +10:00
parent da83aff19c
commit 734c2e3c99
71 changed files with 333 additions and 605 deletions

View File

@@ -1,23 +1,13 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
using PARR.DAL.Context;
using PARR.DAL.Models.Schedule;
using PARR.DAL.Services.Abstracts;
using PARR.DAL.Repositories.Base;
using PARR.DAL.Services.Interfaces.Schedule;
namespace PARR.DAL.Services.Implementations.Schedule
{
internal class ScheduleExcludeTypeCalendarService : BaseService<ScheduleExcludeTypeCalendar>, IScheduleExcludeTypeCalendarService
internal class ScheduleExcludeTypeCalendarService : BaseRepository<ScheduleExcludeTypeCalendar>, IScheduleExcludeTypeCalendarService
{
private readonly DataContext dataContext;
protected override DbSet<ScheduleExcludeTypeCalendar> EntitySet => dataContext.ScheduleExcludeTypeCalendars;
protected override DataContext EntitiContext => dataContext;
public ScheduleExcludeTypeCalendarService(DataContext dataContext, ILogger<ScheduleExcludeTypeCalendarService> logger) : base(logger)
{
this.dataContext = dataContext;
}
public ScheduleExcludeTypeCalendarService(DataContext dataContext, ILogger<ScheduleExcludeTypeCalendarService> logger) : base(logger, dataContext) { }
}
}

View File

@@ -1,23 +1,13 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
using PARR.DAL.Context;
using PARR.DAL.Models.Schedule;
using PARR.DAL.Services.Abstracts;
using PARR.DAL.Repositories.Base;
using PARR.DAL.Services.Interfaces.Schedule;
namespace PARR.DAL.Services.Implementations.Schedule
{
internal class ScheduleExcludeTypeService : BaseService<ScheduleExcludeType>, IScheduleExcludeTypeService
internal class ScheduleExcludeTypeService : BaseRepository<ScheduleExcludeType>, IScheduleExcludeTypeService
{
private readonly DataContext dataContext;
protected override DbSet<ScheduleExcludeType> EntitySet => dataContext.ScheduleExcludeTypes;
protected override DataContext EntitiContext => dataContext;
public ScheduleExcludeTypeService(DataContext dataContext, ILogger<ScheduleExcludeTypeService> logger) : base(logger)
{
this.dataContext = dataContext;
}
public ScheduleExcludeTypeService(DataContext dataContext, ILogger<ScheduleExcludeTypeService> logger) : base(logger, dataContext) { }
}
}

View File

@@ -10,10 +10,12 @@ namespace PARR.DAL.Services.Implementations.Schedule
internal sealed class ScheduleResponseAreaTimeOffsetService : IScheduleResponseAreaTimeOffsetService
{
private readonly IReadOnlyDictionary<string, ScheduleResponseAreaTimeOffset> offsetList;
/// <summary>
/// ЗО по умолчанию
/// </summary>
private readonly string defaultResponseArea;
/// <summary>
/// Настройки, если не нашли в offsetList
/// </summary>