public IHttpActionResult PostGateway([FromBody] CreateGatewayInput input) { GatewayDetailDto response = null; try { response = _service.Add(input); } catch (Exception e) { Helpers.ExceptionHelper.ThrowException(e); } return(Ok(response)); }
public GatewayDetailDto GetGatewayDetails([FromUri] int id) { GatewayDetailDto response = new GatewayDetailDto(); try { response = _service.FindByIdWithDeviceInfo(id); } catch (Exception e) { Helpers.ExceptionHelper.ThrowException(e); } return(response); }