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