public IHttpActionResult Delete(int id) { var entry = _blogRepo.GetBlogById(id); if (_blogRepo.DeleteBlog(entry) == 1) { return(Ok()); } else { return(NotFound()); } }
public ActionResult Details(int id) { return(View(blogrepo.GetBlogById(id))); }
private BlogPost ExtraireEntite(int?id) { return(id == null ? new BlogPost() : _bloguesRepo.GetBlogById(id.GetValueOrDefault())); }