public async Task Synchronize() { var registrationDataStore = new RegistrationDataStore(); var dbContext = new DatabaseContextOffline(); foreach (var queue in dbContext.Queue.ToList()) { var success = await registrationDataStore.AddItemAsync2(queue); if (success) { dbContext.Queue.Remove(queue); dbContext.SaveChanges(); } } }
public static List <IParticipant> GetRegistrations(string email) { List <IParticipant> participations = new List <IParticipant>(); var registrations = from r in RegistrationDataStore.Items <Registration>() where r.Email == email select r; foreach (Registration r in registrations) { IParticipant p = AttendRegistrationEngine.GetParticipant(r.ParticipantBlock); if (p != null) { participations.Add(p); } } return(participations); }
public void Save() { RegistrationDataStore.Save(this); }