feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Domain.Entities.Job;
|
||||
|
||||
namespace PARR.TemplateDistributor.Services
|
||||
{
|
||||
@@ -24,10 +23,10 @@ namespace PARR.TemplateDistributor.Services
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
|
||||
var service = scope.ServiceProvider.GetService<IJobGroupService>();
|
||||
var service = scope.ServiceProvider.GetService<IJobGroupRepository>();
|
||||
|
||||
if (service == null)
|
||||
throw new Exception($"Не найден сервис: {nameof(IJobGroupService)}");
|
||||
throw new Exception($"Не найден сервис: {nameof(IJobGroupRepository)}");
|
||||
|
||||
var jobGroup = await service.Get().Include(t => t.DistributionConfig).FirstOrDefaultAsync(t => t.Id == jobGroupId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user