public async Task <ActionResult> GetGarageById(int garageId) { try { GarageDto garageDto = await _garageService.GetGarageById(garageId); return(Response.Ok(garageDto)); } catch (BaseException e) { _logger.LogInformation(ExceptionHandlerHelper.ExceptionMessageStringToLogger(e)); return(Response.HandleExceptions(e)); } catch (Exception e) { _logger.LogError(e, GetType().Name + "." + MethodBase.GetCurrentMethod().Name); return(Response.InternalServerError()); } }
public IActionResult Details(Guid id) { var garage = _garageService.GetGarageById(id); return(View(_mapper.Map <GarageViewModel>(garage))); }
public IActionResult GetGarageById([FromQuery] int uid) { var result = garageService.GetGarageById(uid); return(new OkObjectResult(result)); }