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);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
@@ -12,15 +12,15 @@ namespace PARR.TemplateDistributor
|
||||
private readonly ILogger<TemplateDistributor> logger;
|
||||
//private readonly INextRunService nextRunService;
|
||||
private readonly INextRunService nextRunService;
|
||||
private readonly ITemplateService templateService;
|
||||
private readonly IRobotConfigurationService robotConfigurationService;
|
||||
private readonly ITemplateRepository templateService;
|
||||
private readonly IRobotConfigurationRepository robotConfigurationService;
|
||||
|
||||
public TemplateDistributor(
|
||||
ILogger<TemplateDistributor> logger,
|
||||
//INextRunService nextRunService,
|
||||
INextRunService nextRunService,
|
||||
ITemplateService templateService,
|
||||
IRobotConfigurationService robotConfigurationService
|
||||
ITemplateRepository templateService,
|
||||
IRobotConfigurationRepository robotConfigurationService
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace PARR.TemplateDistributor
|
||||
{
|
||||
public static void InstallTemplateDistributorSerivces(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.InstallDalServices(configuration);
|
||||
services.AddDalServices(configuration);
|
||||
services.AddCoreServices(configuration);
|
||||
services.AddInfrastructureServices(configuration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user