예제 #1
0
        public IHttpActionResult Delete(int id)
        {
            var entry = _blogRepo.GetBlogById(id);

            if (_blogRepo.DeleteBlog(entry) == 1)
            {
                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }
예제 #2
0
 public ActionResult Details(int id)
 {
     return(View(blogrepo.GetBlogById(id)));
 }
예제 #3
0
 private BlogPost ExtraireEntite(int?id)
 {
     return(id == null ?
            new BlogPost()
     : _bloguesRepo.GetBlogById(id.GetValueOrDefault()));
 }