public void Add(mRA section) { using (DefaultCS db = new DefaultCS()) { db.mRAs.MergeOption = MergeOption.NoTracking; db.mRAs.AddObject(section); db.SaveChanges(); } }
public void Update(mRA section) { using (DefaultCS db = new DefaultCS()) { var d = db.mRAs.Where(i => i.RASST_ID == section.RASST_ID).First(); d.RANGEASST_ENAME = section.RANGEASST_ENAME; d.RANGE_ID = section.RANGE_ID; //d.OfficerName = section.OfficerName; d.Std = section.Std; d.Phoneno = section.Phoneno; d.faxno = section.faxno; d.Mobileno = section.Mobileno; d.UpdateOn = section.UpdateOn; db.SaveChanges(); } }
/// <summary> /// Deprecated Method for adding a new object to the mRAs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTomRAs(mRA mRA) { base.AddObject("mRAs", mRA); }
/// <summary> /// Create a new mRA object. /// </summary> /// <param name="rASST_ID">Initial value of the RASST_ID property.</param> /// <param name="rANGE_ID">Initial value of the RANGE_ID property.</param> public static mRA CreatemRA(global::System.Int64 rASST_ID, global::System.Int32 rANGE_ID) { mRA mRA = new mRA(); mRA.RASST_ID = rASST_ID; mRA.RANGE_ID = rANGE_ID; return mRA; }