public async Task <bool> addRegister(ClassRegister register) { context.Add(register); IQueryable <GymClasses> query = context.Classes; query = query.Where(p => p.ClassId == register.ClassIdForeignKey); GymClasses classToUpdate = query.FirstOrDefault(); classToUpdate.CurrentStudents++; context.Update(classToUpdate); return((await context.SaveChangesAsync()) > 0); }
/* * Method Name: * addUser * Purpose: * Adds a new user to the notification settings table. */ public async Task <bool> addUser(NotificationSettings user) { context.Add(user); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addList(GymMember[] memberList) { context.Add(memberList); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addRating(InstructorRating rating) { context.Add(rating); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addGym(Gym gym) { context.Add(gym); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addApplication(GymApplications application) { context.Add(application); return((await context.SaveChangesAsync()) > 0); }
/* * Method Name: * addUser * Purpose: * This adds a user to the reset password table. */ public async Task <bool> addUser(PasswordReset user) { context.Add(user); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addAdmin(SupportUsers user) { context.Add(user); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addAttendence(GymAttendanceRecord record) { context.Add(record); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addWeight(WeightData weight) { context.Add(weight); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addNewClassInstance(ClassAttendance classToGet) { context.Add(classToGet); return((await context.SaveChangesAsync()) > 0); }
public async Task <bool> addClass(GymClasses gymClass) { context.Add(gymClass); return((await context.SaveChangesAsync()) > 0); }