public void Update(Student t) { Student temp = Get(t.StudentId); if (temp != null) { studentDbContext.Entry(temp).CurrentValues.SetValues(t); studentDbContext.SaveChanges(); } }
public void Update(ProgramType t) { ProgramType temp = Get(t.ProgramTypeId); if (temp != null) { programTypeDbContext.Entry(temp).CurrentValues.SetValues(t); programTypeDbContext.SaveChanges(); } }