From 7a64056b49a3d7cb7433786a2f4d59c3b7836692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B0=D0=BD=D0=B4=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Tue, 25 Jul 2023 13:43:12 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=BB=D0=B0=D0=BD=D0=BE=D0=B2=D1=8B=D1=85=20?= =?UTF-8?q?=D0=A0=D0=A2=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repository/ProcessMapRepository.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs b/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs index 1d3fec14..43d11179 100644 --- a/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs +++ b/AsbCloudInfrastructure/Repository/ProcessMapRepository.cs @@ -60,14 +60,13 @@ namespace AsbCloudInfrastructure.Repository return dtos; } - public async Task RemoveRangeAsync(int idWell, CancellationToken cancellationToken) + public Task RemoveRangeAsync(int idWell, CancellationToken cancellationToken) { - var entitites = await dbContext.ProcessMap.Where(x => x.IdWell == idWell) - .ToListAsync(cancellationToken); - + var entitites = dbContext.ProcessMap.Where(x => x.IdWell == idWell); + dbContext.ProcessMap.RemoveRange(entitites); - return await dbContext.SaveChangesAsync(cancellationToken); + return dbContext.SaveChangesAsync(cancellationToken); } public override async Task InsertAsync(ProcessMapPlanDto dto,