예제 #1
0
 [HttpPost] // POST
 public ActionResult <Rental> Create([FromBody] Rental newRental)
 {
     try
     {
         return(Ok(_service.Create(newRental)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }