Beispiel #1
0
        public async Task <bool> removeRegister(ClassRegister register)
        {
            context.Remove(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);
        }
Beispiel #2
0
 public async Task <bool> deleteMember(GymMember member)
 {
     context.Remove(member);
     return((await context.SaveChangesAsync()) > 0);
 }
Beispiel #3
0
 public async Task <bool> removeApplication(GymApplications application)
 {
     context.Remove(application);
     return((await context.SaveChangesAsync()) > 0);
 }
Beispiel #4
0
 /*
  * Method Name:
  *  deleteUser
  * Purpose:
  *  This removes a user, as their password changed.
  */
 public async Task <bool> deleteUser(PasswordReset user)
 {
     context.Remove(user);
     return((await context.SaveChangesAsync()) > 0);
 }
Beispiel #5
0
 public async Task <bool> removeClass(GymClasses gymClass)
 {
     context.Remove(gymClass);
     return((await context.SaveChangesAsync()) > 0);
 }