feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Base;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.TemplateActivator;
|
||||
@@ -29,13 +29,13 @@ internal class ValidatorService : IValidatorService
|
||||
switch (entityType)
|
||||
{
|
||||
case (SyncTaskEntityTypeEnum.JobGroup):
|
||||
return await IsValidAync<IJobGroupService, JobGroup>(id);
|
||||
return await IsValidAync<IJobGroupRepository, JobGroup>(id);
|
||||
|
||||
case (SyncTaskEntityTypeEnum.Job):
|
||||
return await IsValidAync<IJobService, Job>(id);
|
||||
return await IsValidAync<IJobRepository, Job>(id);
|
||||
|
||||
case (SyncTaskEntityTypeEnum.Template):
|
||||
return await IsValidAync<ITemplateService, Template>(id);
|
||||
return await IsValidAync<ITemplateRepository, Template>(id);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -43,7 +43,7 @@ internal class ValidatorService : IValidatorService
|
||||
|
||||
|
||||
private async Task<bool> IsValidAync<TService, TEntity>(Guid id)
|
||||
where TService : class, IBaseService<TEntity>
|
||||
where TService : class, IBaseRepository<TEntity>
|
||||
where TEntity : class, IBaseEntity
|
||||
{
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
|
||||
Reference in New Issue
Block a user