From ed5f181754d1c9dc87fd529a6bdccac0e8c23c80 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Tue, 20 Sep 2022 12:29:55 +0500 Subject: [PATCH] =?UTF-8?q?#5996638=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=81=D0=B0=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B1=D1=83=D1=80=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=81=D0=B5=D1=85=20=D1=81=D0=B5?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B9=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=B7?= =?UTF-8?q?=D0=B8=D1=82=D0=BD=D0=BE=D0=B9=20=D1=81=D0=BA=D0=B2=D0=B0=D0=B6?= =?UTF-8?q?=D0=B8=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/DrillParamsService.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DrillParamsService.cs b/AsbCloudInfrastructure/Services/DrillParamsService.cs index 6dfc40f2..bc488e6e 100644 --- a/AsbCloudInfrastructure/Services/DrillParamsService.cs +++ b/AsbCloudInfrastructure/Services/DrillParamsService.cs @@ -104,21 +104,26 @@ namespace AsbCloudInfrastructure.Services public async Task> GetCompositeAllAsync(int idWell, CancellationToken token = default) { - var allDrillParams = await db.WellComposites + var allDrillParamsQuery = db.WellComposites + .Where(c => c.IdWell == idWell) .Join(db.DrillParams, - c => new { IdWell = c.IdWellSrc, IdSection = c.IdWellSectionType }, - p => new { IdWell = p.IdWell, IdSection = p.IdWellSectionType }, - (c, p) => p) + c => c.IdWellSrc, + p => p.IdWell, + (c, p) => p); + + var allDrillParams = await allDrillParamsQuery .AsNoTracking() .ToListAsync(token) .ConfigureAwait(false); - var compositeWellDrillParams = await db.WellComposites + var compositeWellDrillParamsQuery = db.WellComposites .Where(c => c.IdWell == idWell) .Join(db.DrillParams, c => new { IdWell = c.IdWellSrc, IdSection = c.IdWellSectionType }, p => new { IdWell = p.IdWell, IdSection = p.IdWellSectionType }, - (c, p) => p) + (c, p) => p); + + var compositeWellDrillParams = await compositeWellDrillParamsQuery .AsNoTracking() .ToListAsync(token) .ConfigureAwait(false);