From 7ba021c9e71cd59ead81207dbf0d6784aff9a703 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Tue, 25 Jul 2023 16:40:25 +0500 Subject: [PATCH] =?UTF-8?q?IProcessMapPlanRepository=20=D0=BF=D0=BE=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B0=D1=86=D0=B8=D1=8E,=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B8=D0=BC=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Repositories/IProcessMapRepository.cs | 10 +++++----- .../Repository/ProcessMapRepository.cs | 6 +++--- .../Services/ProcessMap/ProcessMapPlanImportService.cs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AsbCloudApp/Repositories/IProcessMapRepository.cs b/AsbCloudApp/Repositories/IProcessMapRepository.cs index 10710d9a..f6dbe6b4 100644 --- a/AsbCloudApp/Repositories/IProcessMapRepository.cs +++ b/AsbCloudApp/Repositories/IProcessMapRepository.cs @@ -9,12 +9,12 @@ using System.Threading.Tasks; namespace AsbCloudApp.Repositories { /// - /// РТК + /// РТК-план /// public interface IProcessMapPlanRepository : IRepositoryWellRelated { /// - /// Получить параметры бурения начиная с даты. + /// Получить РТК-план начиная с даты. /// /// /// @@ -24,7 +24,7 @@ namespace AsbCloudApp.Repositories DateTime? updateFrom, CancellationToken token = default); /// - /// Получить параметры бурения + /// Получить РТК-план /// /// /// @@ -33,11 +33,11 @@ namespace AsbCloudApp.Repositories CancellationToken token); /// - /// Удалить РТК + /// Удалить РТК-план по скважине /// /// /// /// - Task RemoveRangeAsync(int idWell, CancellationToken cancellationToken); + Task RemoveByWellAsync(int idWell, CancellationToken cancellationToken); } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs b/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs index 43d11179..6597210b 100644 --- a/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs +++ b/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs @@ -60,11 +60,11 @@ namespace AsbCloudInfrastructure.Repository return dtos; } - public Task RemoveRangeAsync(int idWell, CancellationToken cancellationToken) + public Task RemoveByWellAsync(int idWell, CancellationToken cancellationToken) { - var entitites = dbContext.ProcessMap.Where(x => x.IdWell == idWell); + var query = dbContext.ProcessMap.Where(x => x.IdWell == idWell); - dbContext.ProcessMap.RemoveRange(entitites); + dbContext.ProcessMap.RemoveRange(query); return dbContext.SaveChangesAsync(cancellationToken); } diff --git a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs index 06551f24..2b4467af 100644 --- a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs @@ -62,7 +62,7 @@ public class ProcessMapPlanImportService : IProcessMapPlanImportService var processPlanMaps = ParseWorkBook(workBook); if (deleteProcessMapPlansBeforeImport) - await processMapPlanRepository.RemoveRangeAsync(idWell, cancellationToken); + await processMapPlanRepository.RemoveByWellAsync(idWell, cancellationToken); foreach (var processPlanMap in processPlanMaps) {