コード例 #1
0
 /// <summary>
 /// Create a new BladeChassis object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="nICTeaming">Initial value of the NICTeaming property.</param>
 /// <param name="rackChassisPort">Initial value of the RackChassisPort property.</param>
 public static BladeChassis CreateBladeChassis(global::System.Int32 id, global::System.Boolean nICTeaming, global::System.String rackChassisPort)
 {
     BladeChassis bladeChassis = new BladeChassis();
     bladeChassis.Id = id;
     bladeChassis.NICTeaming = nICTeaming;
     bladeChassis.RackChassisPort = rackChassisPort;
     return bladeChassis;
 }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the BladeChassis EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToBladeChassis(BladeChassis bladeChassis)
 {
     base.AddObject("BladeChassis", bladeChassis);
 }
コード例 #3
0
        public BladeChassis CreateBladeChassis(string bladeSwitchLocation, bool bladeTeaming)
        {
            var bladeChassis = db.BladeChassis.SingleOrDefault(x => x.RackChassisPort == bladeSwitchLocation.Trim());

            if (bladeChassis == null)
            {
                bladeChassis = new BladeChassis
                {
                    RackChassisPort = bladeSwitchLocation.Trim()
                };

                db.BladeChassis.AddObject(bladeChassis);
            }

            bladeChassis.NICTeaming = bladeTeaming;

            return bladeChassis;
        }