From 9ab816cb4695ba02b132490cec3e0a69a798111f Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Thu, 8 Aug 2024 15:37:56 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=D0=BC=20=D1=80=D0=B5=D0=B2=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudInfrastructure/Services/WellContactService.cs | 8 ++++---- AsbCloudWebApi/Controllers/WellContactController.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AsbCloudInfrastructure/Services/WellContactService.cs b/AsbCloudInfrastructure/Services/WellContactService.cs index 8fb7b6e6..770375f3 100644 --- a/AsbCloudInfrastructure/Services/WellContactService.cs +++ b/AsbCloudInfrastructure/Services/WellContactService.cs @@ -32,12 +32,12 @@ namespace AsbCloudInfrastructure.Services query = query.Where(c => c.IdCompanyType == request.ContactTypeId); }; - var dtos = query.Select(c => c.Adapt()); - - var entities = await dtos.AsNoTracking() + var entities = await query.AsNoTracking() .ToArrayAsync(token); - return entities; + var dtos = entities.Select(c => c.Adapt()); + + return dtos; } public async Task GetAsync(int idWell, int id, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/WellContactController.cs b/AsbCloudWebApi/Controllers/WellContactController.cs index 6efe55b1..1bd43564 100644 --- a/AsbCloudWebApi/Controllers/WellContactController.cs +++ b/AsbCloudWebApi/Controllers/WellContactController.cs @@ -71,7 +71,7 @@ namespace AsbCloudWebApi.Controllers /// ключи скважин /// /// - [HttpGet] + [HttpGet("/api/well/[controller]")] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetAllAsync([FromQuery] IEnumerable idsWells, CancellationToken token) {