コード例 #1
0
        public IActionResult Delete(Rental rentals)
        {
            var result = _rentalsService.Delete(rentals);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
コード例 #2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _rentalsService.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }