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

            if (this._context.IsAttached(xmwarehouse))
            {
                this._context.XMWarehouses.Attach(xmwarehouse);
            }

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

            if (!this._context.IsAttached(xmwarehouse))
            {
                this._context.XMWarehouses.AddObject(xmwarehouse);
            }

            this._context.SaveChanges();
        }