Пример #1
0
        public async Task <ActionResult> Delete(int id)
        {
            Publication post = _publication.GetPostDB(id);

            if (post != null)
            {
                _publication.DeletePost(post);
            }
            return(RedirectToAction("AllPosts"));
        }
Пример #2
0
 public void DeletePost(Publication post) => _publication.DeletePost(post);