Exemple #1
0
        /// <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();
        }
Exemple #2
0
        /// <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();
        }