Exemplo n.º 1
0
 static void CreateSampleData(ThripEntities dataContext)
 {
     CreateSampleConference(dataContext);
     dataContext.SaveChanges();
     CreateSamplePeople(dataContext);
     dataContext.SaveChanges();
     CreateSampleSessions(dataContext);
     dataContext.SaveChanges();
     CreateSampleLocations(dataContext);
     dataContext.SaveChanges();
     CreateSampleTimeSlots(dataContext);
     dataContext.SaveChanges();
     CreateSampleScheduledSessions(dataContext);
     dataContext.SaveChanges();
     CreateSampleSponsors(dataContext);
     dataContext.SaveChanges();
     CreateSampleFacilitators(dataContext);
     dataContext.SaveChanges();
 }
Exemplo n.º 2
0
        static void CreateSampleTimeSlots(ThripEntities dataContext)
        {
            var _timeSlot = new TimeSlot();

            _timeSlot.Id = Guid.NewGuid();
            _timeSlot.Name = "Welcome Session";
            _timeSlot.StartDate = DateTime.Now; // DateTime.Parse("9/3/2010 08:00");
            _timeSlot.EndDate = DateTime.Now.AddHours(1); // DateTime.Parse("9/3/2010 09:00");
            dataContext.TimeSlots.AddObject(_timeSlot);

            dataContext.SaveChanges();

            _timeSlot = new TimeSlot();

            _timeSlot.Id = Guid.NewGuid();
            _timeSlot.Name = "Friday Morning";
            _timeSlot.StartDate = DateTime.Parse("9/3/2010 09:15");
            _timeSlot.EndDate = DateTime.Parse("9/3/2010 11:00");
            dataContext.TimeSlots.AddObject(_timeSlot);

            dataContext.SaveChanges();

            _timeSlot = new TimeSlot();

            _timeSlot.Id = Guid.NewGuid();
            _timeSlot.Name = "Friday Midday";
            _timeSlot.StartDate = DateTime.Parse("9/3/2010 11:15");
            _timeSlot.EndDate = DateTime.Parse("9/3/2010 12:45");
            dataContext.TimeSlots.AddObject(_timeSlot);

            dataContext.SaveChanges();

            _timeSlot = new TimeSlot();

            _timeSlot.Id = Guid.NewGuid();
            _timeSlot.Name = "Friday Afternoon";
            _timeSlot.StartDate = DateTime.Parse("9/3/2010 13:00");
            _timeSlot.EndDate = DateTime.Parse("9/3/2010 16:00");
            dataContext.TimeSlots.AddObject(_timeSlot);

            dataContext.SaveChanges();

            _timeSlot = new TimeSlot();

            _timeSlot.Id = Guid.NewGuid();
            _timeSlot.Name = "Satuday Wake-up";
            _timeSlot.StartDate = DateTime.Parse("9/4/2010 08:00");
            _timeSlot.EndDate = DateTime.Parse("9/4/2010 09:00");
            dataContext.TimeSlots.AddObject(_timeSlot);

            dataContext.SaveChanges();
        }