public virtual async Task <TEntity> CreateEntityAsync(TEntity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } entity = EntityStore.Create(entity); await this.SaveChangesAsync(); return(entity); }
public async Task AddDepartmentAsync(Department department) { if (department == null) { throw new ArgumentNullException("department"); } _departmentStore.Create(department); await SaveChanges(); }
public async Task AddClassAsync(Class class1) { if (class1 == null) { throw new ArgumentNullException("class1"); } _classStore.Create(class1); await SaveChanges(); }
public async Task CreateGradeAsync(Grade grade) { if (grade == null) { throw new ArgumentNullException("grade"); } _gradeStore.Create(grade); await SaveChanges(); }
public async Task CreateMajorAsync(Major major) { if (major == null) { throw new ArgumentNullException("major"); } _majorStore.Create(major); await SaveChanges(); }
public LessonAsign AddLessonAsign(LessonAsign lessonAsign) { ThrowIfDisposed(); if (lessonAsign == null) { throw new ArgumentNullException("lessonAsign"); } return(_lessonAsignStore.Create(lessonAsign)); }
public LessonInfo AddLessonInfo(LessonInfo lessonInfo) { ThrowIfDisposed(); if (lessonInfo == null) { throw new ArgumentNullException("lessonInfo"); } return(_lessonInfoStore.Create(lessonInfo)); }
public async Task AddLoginLogAsync(User user, LoginLog loginLog) { if (user == null) { throw new ArgumentNullException("user"); } if (loginLog == null) { throw new ArgumentNullException("loginLog"); } //DbSet<LoginLog> dbSet = _loginLogs; LoginLog instance = new LoginLog(loginLog.LoginIp, loginLog.LoginTime); instance.UserId = user.Id; //instance.UserId = loginLog.UserId; LoginLog entity = instance; _loginLogStore.Create(entity); //dbSet.Add(entity); await SaveChangesAsync(); }