public void UpdateRowInGroup(string updGroupName, int IdOfName) { Groups currentGroup = context.Groups.FirstOrDefault(group => group.Id == IdOfName); if (currentGroup == null) { } currentGroup.Name = updGroupName; context.Entry(currentGroup).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); }
public void UpdateRowInSubjects(string updSubjectName, int IdOfName) { Subjects currentSubject = context.Subjects.FirstOrDefault(subject => subject.Id == IdOfName); if (currentSubject == null) { } currentSubject.Name = updSubjectName; context.Entry(currentSubject).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); }
public void UpdateStudent(Student student) { context.Entry(student).State = EntityState.Modified; }
public void UpdateSubject(DBModels.Subject subject) { context.Entry(subject).State = EntityState.Modified; }
public void UpdateGroup(DBModels.Group group) { context.Entry(group).State = EntityState.Modified; }