feat: разделение на repository - services
This commit is contained in:
@@ -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) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user