public async Task <IActionResult> Edit(int id) { RoomTypeEditInputModel roomTypeInputModel = (await roomTypeService.GetById(id) ).To <RoomTypeEditInputModel>(); if (roomTypeInputModel == null) { return(Redirect("/Administration/RoomtType/All")); } return(View(roomTypeInputModel)); }
public async Task <IActionResult> GetById(TRequest <int> request) { var response = new Response <object>(); try { response.Data = await _roomTypeService.GetById(request.value); response.Success = true; } catch (Exception ex) { response.Success = false; response.Message = ex.Message + "," + ex.InnerException; } return(Ok(response)); }
public async Task <RoomType> GetById(int id) { return(await roomTypeService.GetById(id)); }
public ApiResultModel<TIPO_HABITACION> GetById([FromUri]int id) => GetApiResultModel(() => _roomTypeService.GetById<TIPO_HABITACION>(id));