Esempio n. 1
0
        public IHttpActionResult PostGateway([FromBody] CreateGatewayInput input)
        {
            GatewayDetailDto response = null;

            try
            {
                response = _service.Add(input);
            }
            catch (Exception e)
            {
                Helpers.ExceptionHelper.ThrowException(e);
            }
            return(Ok(response));
        }
Esempio n. 2
0
        public GatewayDetailDto GetGatewayDetails([FromUri] int id)
        {
            GatewayDetailDto response = new GatewayDetailDto();

            try
            {
                response = _service.FindByIdWithDeviceInfo(id);
            }
            catch (Exception e)
            {
                Helpers.ExceptionHelper.ThrowException(e);
            }

            return(response);
        }