public void InsertArticle(Article newArticle) { newArticle.CreateTime = DateTime.Now; newArticle.ModifiedTime = DateTime.Now; db.Article.Add(newArticle); db.SaveChanges(); }
public void SaveArticle(Article record) { record.ModifiedTime=DateTime.Now; db.SaveChanges(); }