[HttpPut("{id}")] // PUT public ActionResult <Rental> Edit([FromBody] Rental editRental, int id) { try { editRental.Id = id; return(Ok(_service.Edit(editRental))); } catch (Exception e) { return(BadRequest(e.Message)); } }