/// <summary> /// Update into XMPurchase /// </summary> /// <param name="xmpurchase">XMPurchase</param> public void UpdateXMPurchase(XMPurchase xmpurchase) { if (xmpurchase == null) { return; } if (this._context.IsAttached(xmpurchase)) { this._context.XMPurchases.Attach(xmpurchase); } this._context.SaveChanges(); }
/// <summary> /// Insert into XMPurchase /// </summary> /// <param name="xmpurchase">XMPurchase</param> public void InsertXMPurchase(XMPurchase xmpurchase) { if (xmpurchase == null) { return; } if (!this._context.IsAttached(xmpurchase)) { this._context.XMPurchases.AddObject(xmpurchase); } this._context.SaveChanges(); }