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();
                }
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public void Save()
 {
     RegistrationDataStore.Save(this);
 }