コード例 #1
0
        /// <summary>
        /// Update into XMSpareAddress
        /// </summary>
        /// <param name="xmspareaddress">XMSpareAddress</param>
        public void UpdateXMSpareAddress(XMSpareAddress xmspareaddress)
        {
            if (xmspareaddress == null)
            {
                return;
            }

            if (this._context.IsAttached(xmspareaddress))
            {
                this._context.XMSpareAddresses.Attach(xmspareaddress);
            }

            this._context.SaveChanges();
        }
コード例 #2
0
        /// <summary>
        /// Insert into XMSpareAddress
        /// </summary>
        /// <param name="xmspareaddress">XMSpareAddress</param>
        public void InsertXMSpareAddress(XMSpareAddress xmspareaddress)
        {
            if (xmspareaddress == null)
            {
                return;
            }

            if (!this._context.IsAttached(xmspareaddress))
            {
                this._context.XMSpareAddresses.AddObject(xmspareaddress);
            }

            this._context.SaveChanges();
        }