Ejemplo n.º 1
0
        public void Delete()
        {
            int postId = CECRequest.GetQueryInt("id", 0);
            int userId = PlantEngContext.Current.UserId;

            BlogPostService.Delete(postId, userId);
            Response.Redirect("/accounts/blog/", true);
        }
Ejemplo n.º 2
0
        public IActionResult Delete(BlogPostMD metaData)
        {
            var result = _service.Delete(metaData);

            if (!result.Status)
            {
                result.Data.ReferenceTypeOptions = _service.GetOptions();
                ViewBag.ErrorMessage             = result.Message;
                ViewBag.BlogId = metaData.BlogId;

                return(View(metaData));
            }

            return(RedirectToAction("Index", "BlogPost", new { blogId = metaData.BlogId }));
        }