Exemplo n.º 1
0
 public async Task AddStudentsToClassAsync(Class class1, User[] users)
 {
     foreach (var user in users)
     {
         user.StudentInfo.BelongClass = class1;
         _userStore.Update(user);
     }
     await Context.SaveChangesAsync();
 }
Exemplo n.º 2
0
 public virtual async Task UpdateEntityAsync(TEntity entity)
 {
     ThrowIfDisposed();
     if (entity == null)
     {
         throw new ArgumentNullException("entity");
     }
     EntityStore.Update(entity);
     await this.SaveChangesAsync();
 }
 public async Task UpdateClassAsync(Class class1)
 {
     if (class1 == null)
     {
         throw new ArgumentNullException("class1");
     }
     _classStore.Update(class1);
     await SaveChanges();
 }
 public async Task UpdateGradeAsync(Grade grade)
 {
     if (grade == null)
     {
         throw new ArgumentNullException("grade");
     }
     _gradeStore.Update(grade);
     await SaveChanges();
 }
Exemplo n.º 5
0
 public void UpdateLessonAsign(LessonAsign lessonAsign)
 {
     ThrowIfDisposed();
     if (lessonAsign == null)
     {
         throw new ArgumentNullException("lessonAsign");
     }
     _lessonAsignStore.Update(lessonAsign);
 }
Exemplo n.º 6
0
 public void UpdateLessonInfo(LessonInfo lessonInfo)
 {
     ThrowIfDisposed();
     if (lessonInfo == null)
     {
         throw new ArgumentNullException("lessonInfo");
     }
     _lessonInfoStore.Update(lessonInfo);
 }
 public async Task UpdateMajorAsync(Major major)
 {
     if (major == null)
     {
         throw new ArgumentNullException("major");
     }
     _majorStore.Update(major);
     //_majors.Attach(major);
     await SaveChanges();
 }
 public async Task UpdateDepartmentAsync(Department department)
 {
     _departmentStore.Update(department);
     await SaveChanges();
 }