Esempio n. 1
0
 public void EditUser(Users user)
 {
     db = new UsersContext();
     db.Entry(user).State = EntityState.Modified;
     db.SaveChanges();
 }
Esempio n. 2
0
 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();
 }