public async Task <ActionResult <Response> > UpdPedido(MuratPedidos pedidos) { Response response = new Response(); object rpta = new object(); try { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } rpta = await _muratserviceslogic.UpdPedido(pedidos); if (rpta == null) { return(NotFound()); } } catch (Exception e) { response.Status = Error500; response.Message = e.Message; return(Ok(response)); } return(Ok(rpta)); }
public async Task <ActionResult <Response> > UpdPedido(MuratPedidos pedidos) { object rpta = new object(); try { rpta = await _muratserviceslogic.UpdPedido(pedidos); if (rpta == null) { return(NotFound()); } } catch (Exception e) { Response response = new Response(); response.Status = Constant.Error500; response.Message = e.Message; return(Ok(response)); } return(Ok(rpta)); }