public void EditUser(Users user) { db = new UsersContext(); db.Entry(user).State = EntityState.Modified; db.SaveChanges(); }
public void EditFeedback(Feedbacks updatedFeedback) { updatedFeedback.DateTime = DateTime.Today.ToShortDateString() + " в " + DateTime.Now.ToLongTimeString(); db = new UsersContext();// without this updating dosen't work db.Entry(updatedFeedback).State = EntityState.Modified; db.SaveChanges(); }