public ActionResult ArticleEdit(Article article)
 {
     _articleService.Update(article);
     return RedirectToAction("Article", "Admin");
 }
Exemple #2
0
 public void Update(Article article)
 {
     _db.Article.AddOrUpdate(article);
     _db.SaveChanges();
 }
 public ActionResult ArticleCreate(Article article)
 {
     _articleService.Insert(article);
     return RedirectToAction("Article", "Admin");
 }
Exemple #4
0
 public void Insert(Article article)
 {
     article.CreateOn = DateTime.Now;
     _db.Article.Add(article);
     _db.SaveChanges();
 }