Exemplo n.º 1
0
        public IActionResult DeletePost(int id, PostViewModel model)
        {
            Post post = _repository.GetPostById(id);

            _repository.DeleteEntity(post);

            _repository.SaveAll();
            return(RedirectToAction("AllPost"));
        }