Esempio n. 1
0
 public MyBlogRepository()
 {
     db = new MyBlogEntities();
     publications = new PublicationContext();
 }
Esempio n. 2
0
 public void EditFeedback(Feedbacks updatedFeedback)
 {
     updatedFeedback.DateTime = DateTime.Today.ToShortDateString() + " в " + DateTime.Now.ToLongTimeString();
     db = new MyBlogEntities();// without this updating dosen't work
     db.Entry(updatedFeedback).State = EntityState.Modified;
     db.SaveChanges();
 }