Пример #1
0
        /// <summary>
        /// Update into XMProduct
        /// </summary>
        /// <param name="xmproduct">XMProduct</param>
        public void UpdateXMProduct(XMProduct xmproduct)
        {
            if (xmproduct == null)
            {
                return;
            }

            if (this._context.IsAttached(xmproduct))
            {
                this._context.XMProducts.Attach(xmproduct);
            }

            this._context.SaveChanges();
        }
Пример #2
0
        /// <summary>
        /// Insert into XMProduct
        /// </summary>
        /// <param name="xmproduct">XMProduct</param>
        public void InsertXMProduct(XMProduct xmproduct)
        {
            if (xmproduct == null)
            {
                return;
            }

            if (!this._context.IsAttached(xmproduct))
            {
                this._context.XMProducts.AddObject(xmproduct);
            }

            this._context.SaveChanges();
        }