public IActionResult DeleteRent(int id) { var userName = User.Identity.Name; var rent = _repo.GetRent(userName, id); if (rent == null) { return(NotFound()); } _repo.DeleteRent(userName, id); return(NoContent()); }
public bool DeleteRent(int id) { return(rentRepository.DeleteRent(id)); }