Beispiel #1
0
        public IActionResult Delete(int id)
        {
            var blog = _blogData.GetBlog(id);

            _blogData.DeleteBlog(blog);
            return(RedirectToAction("Index", "Profile"));
        }
        public IActionResult OnPost(int blogId)
        {
            var confirmdelete = blogdata.DeleteBlog(blogId);

            if (confirmdelete != true)
            {
                return(Page());
            }
            blogdata.Commit();
            var us = HttpContext.Session.GetString("username");

            return(RedirectToPage("Dashboard", new { urlname = us }));
        }