/// <summary>
 /// Deprecated Method for adding a new object to the ScheduledSessions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToScheduledSessions(ScheduledSession scheduledSession)
 {
     base.AddObject("ScheduledSessions", scheduledSession);
 }
Example #2
0
        static void CreateSampleScheduledSessions(ThripEntities dataContext)
        {
            var _scheduledSession = new ScheduledSession();

            _scheduledSession.Id = Guid.NewGuid();
            _scheduledSession.SessionId = dataContext.Sessions.Where(s => s.Name == "Breakfast and Keynote").SingleOrDefault().Id;
            _scheduledSession.TimeSlotId = dataContext.TimeSlots.Where(ts => ts.Name == "Welcome Session").SingleOrDefault().Id;
            _scheduledSession.LocationId = dataContext.Locations.Where(l => l.Name == "Main Ballroom").SingleOrDefault().Id;
            dataContext.ScheduledSessions.AddObject(_scheduledSession);

            _scheduledSession = new ScheduledSession();

            _scheduledSession.Id = Guid.NewGuid();
            _scheduledSession.SessionId = dataContext.Sessions.Where(s => s.Name == "MVC 101").SingleOrDefault().Id;
            _scheduledSession.TimeSlotId = dataContext.TimeSlots.Where(ts => ts.Name == "Friday Morning").SingleOrDefault().Id;
            _scheduledSession.LocationId = dataContext.Locations.Where(l => l.Name == "Franklin Room").SingleOrDefault().Id;
            dataContext.ScheduledSessions.AddObject(_scheduledSession);

            _scheduledSession = new ScheduledSession();

            _scheduledSession.Id = Guid.NewGuid();
            _scheduledSession.SessionId = dataContext.Sessions.Where(s => s.Name == "Spark and MVC").SingleOrDefault().Id;
            _scheduledSession.TimeSlotId = dataContext.TimeSlots.Where(ts => ts.Name == "Friday Afternoon").SingleOrDefault().Id;
            _scheduledSession.LocationId = dataContext.Locations.Where(l => l.Name == "Lincoln Room").SingleOrDefault().Id;
            dataContext.ScheduledSessions.AddObject(_scheduledSession);
        }
 /// <summary>
 /// Create a new ScheduledSession object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="sessionId">Initial value of the SessionId property.</param>
 public static ScheduledSession CreateScheduledSession(global::System.Guid id, global::System.Guid sessionId)
 {
     ScheduledSession scheduledSession = new ScheduledSession();
     scheduledSession.Id = id;
     scheduledSession.SessionId = sessionId;
     return scheduledSession;
 }