protected void Page_Load(object sender, EventArgs e) { Article article = new Article() { Title = "Git", Created = DateTime.Now, Modified = DateTime.Now }; using (var ctx = new ItWorkExperienceDbContext()) { ctx.Articles.Add(article); ctx.SaveChanges(); } }
public void Save() { db.SaveChanges(); }