Beispiel #1
0
        private void InitializeCalendar()
        {
            var practice = _context.PracticeCalendarItems.ToListAsync();

            _context.RemoveRange(practice.Result);
            var calendar = _context.CalendarItems.ToListAsync();

            _context.RemoveRange(calendar.Result);
            var athletes = _context.RegisteredAthlete.ToListAsync();

            _context.SaveChanges();
        }
Beispiel #2
0
        private void InitializeSports()
        {
            var teams = _context.Teams.ToListAsync();

            _context.RemoveRange(teams.Result);
            var categogies = _context.SportTypes.ToListAsync();

            _context.RemoveRange(categogies.Result);
            var locations = _context.Programs.ToListAsync();

            _context.RemoveRange(locations.Result);
            var sports = _context.Sports.ToListAsync();

            _context.RemoveRange(sports.Result);
            var places = _context.Locations.ToListAsync();

            _context.RemoveRange(places.Result);
            var times = _context.CalendarTimes.ToListAsync();

            _context.RemoveRange(times.Result);
            _context.SaveChanges();
        }