public async Task <IActionResult> Get(Int64 id) { try { return(Ok(_mapper.Map <Well, WellView>(await _wellRepository.GetSingleAsync(id, x => x.Company, x => x.Shop, x => x.Shop.Company, x => x.Field, x => x.Field.Company, x => x.WellType)))); } catch (Exception e) { Log.Error(e, "WellController.GetById"); return(BadRequest(_messageModelBuilder.CreateModel("500", e.Message))); } }