Пример #1
0
        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();
            }
        }
Пример #2
0
 public void Save()
 {
     db.SaveChanges();
 }