Ejemplo n.º 1
0
 [HttpGet("{id}")] // GETBYID
 public ActionResult <Rental> GetById(int id)
 {
     try
     {
         return(Ok(_service.GetById(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }