public async Task <bool> AddAsync(core.Student Student) { if (await StudentExists(Student.UNITID)) { return(false); } var newStudent = Student.ToDataObject(); _context.Student.Add(newStudent); return(_context.ChangeTracker.HasChanges()); }
public async Task <bool> UpdateAsync(core.Student Student) { if (!await StudentExists(Student.UNITID)) { return(false); } var upStudent = Student.ToDataObject(); _context.Student.Update(upStudent); _context.Update(upStudent); return(_context.ChangeTracker.HasChanges()); }