public void Update(Faculty faculty) { db.Entry(faculty).State = EntityState.Modified; db.SaveChanges(); //using (ApplicantFacultyContext context = db) //{ // Faculty f = db.Faculties.Find(faculty.Id); // f.Name = faculty.Name; // f.QtyBudget = faculty.QtyBudget; // f.QtyAll = faculty.QtyAll; // context.SaveChanges(); //} }
public void Update(Applicant applicant) { db.Entry(applicant).State = EntityState.Modified; db.SaveChanges(); }