Exemple #1
0
        /// <summary>
        /// Update into XMStorage
        /// </summary>
        /// <param name="xmstorage">XMStorage</param>
        public void UpdateXMStorage(XMStorage xmstorage)
        {
            if (xmstorage == null)
            {
                return;
            }

            if (this._context.IsAttached(xmstorage))
            {
                this._context.XMStorages.Attach(xmstorage);
            }

            this._context.SaveChanges();
        }
Exemple #2
0
        /// <summary>
        /// Insert into XMStorage
        /// </summary>
        /// <param name="xmstorage">XMStorage</param>
        public void InsertXMStorage(XMStorage xmstorage)
        {
            if (xmstorage == null)
            {
                return;
            }

            if (!this._context.IsAttached(xmstorage))
            {
                this._context.XMStorages.AddObject(xmstorage);
            }

            this._context.SaveChanges();
        }