feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.
This commit is contained in:
@@ -12,7 +12,7 @@ namespace PARR.JobAutoControl
|
||||
|
||||
public static void InstallJobAutoControlServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.InstallDalServices(configuration);
|
||||
services.AddDalServices(configuration);
|
||||
services.AddCoreServices(configuration);
|
||||
services.AddInfrastructureServices(configuration);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
@@ -43,11 +43,11 @@ namespace PARR.JobAutoControl
|
||||
await using (var scope = serviceProvider.CreateAsyncScope())
|
||||
//using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
var jobAutoControlService = scope.ServiceProvider.GetService<IJobAutoControlService>();
|
||||
var jobAutoControlService = scope.ServiceProvider.GetService<IJobAutoControlRepository>();
|
||||
var mqService = scope.ServiceProvider.GetService<IRabbitService>();
|
||||
|
||||
if (jobAutoControlService == null || mqService == null)
|
||||
throw new Exception($"Не смог получить серивс {nameof(IJobAutoControlService)} или {nameof(IRabbitService)}");
|
||||
throw new Exception($"Не смог получить серивс {nameof(IJobAutoControlRepository)} или {nameof(IRabbitService)}");
|
||||
|
||||
await HandlerAsync(jobAutoControlService, mqService);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace PARR.JobAutoControl
|
||||
}
|
||||
|
||||
|
||||
private async Task HandlerAsync(IJobAutoControlService jobAutoControlService, IRabbitService mqService)
|
||||
private async Task HandlerAsync(IJobAutoControlRepository jobAutoControlService, IRabbitService mqService)
|
||||
{
|
||||
var jobsWithAutoControl = await jobAutoControlService.Get().Where(t => t.IsEnable).ToListAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user