public async Task <ActionResult <Response> > ListPublProductoID(int IdProducto) { Response response = new Response(); object rpta = new object(); try { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } rpta = await _muratserviceslogic.ListPublProductoID(IdProducto); 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> > ListPublProductoID(int IdProducto) { object rpta = new object(); try { rpta = await _muratserviceslogic.ListPublProductoID(IdProducto); 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)); }