Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(int id)
        {
            var deleteGenre = await _genre.Delete(id);

            if (deleteGenre)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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" }));
            }
        }