예제 #1
0
        public IActionResult OnPost()
        {
            if (!service.ExistsMovie(this.Id))
            {
                return(RedirectToPage("./Index"));
            }

            service.DeleteMovie(this.Id);

            return(RedirectToPage("./Index"));
        }
예제 #2
0
        public IActionResult OnGetDeleteMovie(int id)
        {
            if (!service.ExistsMovie(id))
            {
                return(RedirectToPage("./Index"));
            }

            service.DeleteMovie(id);

            return(RedirectToPage("./Index"));
        }