Ejemplo n.º 1
0
        static void CreateSampleLocations(ThripEntities dataContext)
        {
            var _location = new Location();

            _location.Id = Guid.NewGuid();
            _location.Name = "Main Ballroom";
            _location.Description = "";

            dataContext.Locations.AddObject(_location);

            _location = new Location();

            _location.Id = Guid.NewGuid();
            _location.Name = "Franklin Room";
            _location.Description = "";

            dataContext.Locations.AddObject(_location);

            _location = new Location();

            _location.Id = Guid.NewGuid();
            _location.Name = "Washington Room";
            _location.Description = "";

            dataContext.Locations.AddObject(_location);

            _location = new Location();

            _location.Id = Guid.NewGuid();
            _location.Name = "Jefferson Room";
            _location.Description = "";

            dataContext.Locations.AddObject(_location);

            _location = new Location();

            _location.Id = Guid.NewGuid();
            _location.Name = "Lincoln Room";
            _location.Description = "";

            dataContext.Locations.AddObject(_location);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Locations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLocations(Location location)
 {
     base.AddObject("Locations", location);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new Location object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 public static Location CreateLocation(global::System.Guid id, global::System.String name, global::System.String description)
 {
     Location location = new Location();
     location.Id = id;
     location.Name = name;
     location.Description = description;
     return location;
 }