public async Task <ActionResult> Delete(int id) { Publication post = _publication.GetPostDB(id); if (post != null) { _publication.DeletePost(post); } return(RedirectToAction("AllPosts")); }
public void DeletePost(Publication post) => _publication.DeletePost(post);