public async Task <bool> AddAsync(core.School School) { if (await SchoolExists(School.UNITID)) { return(false); } var newSchool = School.ToDataObject(); _context.School.Add(newSchool); return(_context.ChangeTracker.HasChanges()); }
public async Task <bool> UpdateAsync(core.School School) { if (!await SchoolExists(School.UNITID)) { return(false); } var upSchool = School.ToDataObject(); _context.School.Update(upSchool); _context.Update(upSchool); return(_context.ChangeTracker.HasChanges()); }