public async Task <IActionResult> Delete(int id) { var deleteGenre = await _genre.Delete(id); if (deleteGenre) { return(RedirectToAction("Index")); } return(View()); }
public async Task <IActionResult> Delete(int id) { var deleteGenre = await _genre.Delete(id); if (deleteGenre) { Alert("Genre deleted successfully!", NotificationType.success); return(RedirectToAction("Index")); } Alert("Genre not deleted successfully!", NotificationType.error); return(View()); }
public async Task <IActionResult> Delete(int id) { var deleteGenre = await _genre.Delete(id); if (deleteGenre) { return(Ok("Genre Deleted")); } else { return(BadRequest(new { message = "Unable to delete genre details" })); } }