示例#1
0
 public async Task <IActionResult> Get()
 {
     try
     {
         return(Ok(_mapper.Map <IEnumerable <Well>, IEnumerable <WellView> >(await _wellRepository.AllIncludingAsync(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.Get");
         return(BadRequest(_messageModelBuilder.CreateModel("500", e.Message)));
     }
 }