feat: разделение на repository - services
This commit is contained in:
@@ -1,28 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations.Job
|
||||
{
|
||||
internal class JobGroupService : BaseService<Models.Job.JobGroup>, IJobGroupService
|
||||
internal class JobGroupService : BaseRepository<Models.Job.JobGroup>, IJobGroupService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public JobGroupService(DataContext dataContext, ILogger<JobGroupService> logger) : base(logger)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
protected override DbSet<JobGroup> EntitySet => dataContext.JobGroups;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
public JobGroupService(DataContext dataContext, ILogger<JobGroupService> logger) : base(logger, dataContext) { }
|
||||
|
||||
|
||||
public void DeleteDistributionConfig(JobGroupDistributionConfig distributionConfig)
|
||||
{
|
||||
EntitiContext.JobGroupDistributionConfigs.Remove(distributionConfig);
|
||||
EntityContext.JobGroupDistributionConfigs.Remove(distributionConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user