Exemple #1
0
        public async virtual Task <IActionResult> InsertDevice(
            [FromBody] InsertDeviceDTO device)
        {
            try
            {
                var res = await _mediator.Send(new ParamInsertDevice(device));

                return(StatusCode((int)res.StatusCode, res));
            }
            catch (Exception ex)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message));
            }
        }
Exemple #2
0
 public ParamInsertDevice(InsertDeviceDTO device)
 {
     Device = device;
 }