/// <summary>
 /// Deprecated Method for adding a new object to the Sessions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSessions(Session session)
 {
     base.AddObject("Sessions", session);
 }
Example #2
0
        static void CreateSampleSessions(ThripEntities dataContext)
        {
            var _conference = dataContext.Conferences.SingleOrDefault(c => c.Name == "MVC Springboard");

            var _session = new Session();

            _session.Id = Guid.NewGuid();
            _session.Name = "MVC 101";
            _session.Description = "From A to MVC in no time flat!";
            _session.Tags = "mvc,intro";
            var _facilitator = dataContext.People.Where(p => p.LastName == "Wynia").SingleOrDefault();
            _session.Facilitators.Add(_facilitator);
            _session.Conferences.Add(_conference);
            dataContext.Sessions.AddObject(_session);

            _session = new Session();

            _session.Id = Guid.NewGuid();
            _session.Name = "Breakfast and Keynote";
            _session.Description = "";
            _session.Tags = "keynote";
            _session.Facilitators.Add(dataContext.People.Where(p => p.LastName == "Lozano").SingleOrDefault());
            _session.Conferences.Add(_conference);
            dataContext.Sessions.AddObject(_session);

            _session = new Session();

            _session.Id = Guid.NewGuid();
            _session.Name = "Spark and MVC";
            _session.Description = "From Web forms to Spark forms ";
            _session.Tags = "mvc,Spark";
            _session.Facilitators.Add(dataContext.People.Where(p => p.LastName == "LaTourelle").SingleOrDefault());
            _session.Conferences.Add(_conference);
            dataContext.Sessions.AddObject(_session);

            _session = new Session();

            _session.Id = Guid.NewGuid();
            _session.Name = "Entity Framework and MVC";
            _session.Description = "Getting MVC hooked up to EF";
            _session.Tags = "mvc,Entity Framework";
            _session.Facilitators.Add(dataContext.People.Where(p => p.LastName == "Tucker").SingleOrDefault());
            _session.Conferences.Add(_conference);
            dataContext.Sessions.AddObject(_session);
        }
 /// <summary>
 /// Create a new Session object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static Session CreateSession(global::System.Guid id, global::System.String name)
 {
     Session session = new Session();
     session.Id = id;
     session.Name = name;
     return session;
 }