public MyBlogRepository() { db = new MyBlogEntities(); publications = new PublicationContext(); }
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(); }