public ActionResult Edit(int id)
 {
     if (this.Authorizer.IsLogedIn(this.Session, this.Request))
     {
         this.Authorizer.ReauthorizeLogin(this.Session);
         DBBlogArticle article = new DBBlogArticleRepository(this.DatabaseContext).Find(id);
         this.ViewBag.Header = "Editing article " + article.Name;
         return(View(article));
     }
     return(RedirectToAction("Index", "Login"));
 }
 public ActionResult Delete(int id)
 {
     if (this.Authorizer.IsLogedIn(this.Session, this.Request))
     {
         this.Authorizer.ReauthorizeLogin(this.Session);
         DBBlogArticleRepository repository = new DBBlogArticleRepository(this.DatabaseContext);
         DBBlogArticle           article    = repository.Find(id);
         repository.Remove(article, true);
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("Index", "Login"));
 }