public IActionResult Delete(Rental rentals) { var result = _rentalsService.Delete(rentals); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public async Task <IActionResult> DeleteConfirmed(int id) { await _rentalsService.Delete(id); return(RedirectToAction(nameof(Index))); }