public void Add(mWING zone) { using (DefaultCS db = new DefaultCS()) { db.mWINGs.MergeOption = MergeOption.NoTracking; db.mWINGs.AddObject(zone); db.SaveChanges(); } }
public void Update(mWING zone) { using (DefaultCS db = new DefaultCS()) { var d = db.mWINGs.Where(i => i.WING_ID == zone.WING_ID).First(); d.DESCRIPTION = zone.DESCRIPTION; db.SaveChanges(); } }
/// <summary> /// Create a new mWING object. /// </summary> /// <param name="wING_ID">Initial value of the WING_ID property.</param> /// <param name="dESCRIPTION">Initial value of the DESCRIPTION property.</param> public static mWING CreatemWING(global::System.Byte wING_ID, global::System.String dESCRIPTION) { mWING mWING = new mWING(); mWING.WING_ID = wING_ID; mWING.DESCRIPTION = dESCRIPTION; return mWING; }
/// <summary> /// Deprecated Method for adding a new object to the mWINGs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTomWINGs(mWING mWING) { base.AddObject("mWINGs", mWING); }