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) {