Esempio n. 1
0
        /// <summary>
        /// Update into XMPost
        /// </summary>
        /// <param name="xmpost">XMPost</param>
        public void UpdateXMPost(XMPost xmpost)
        {
            if (xmpost == null)
            {
                return;
            }

            if (this._context.IsAttached(xmpost))
            {
                this._context.XMPosts.Attach(xmpost);
            }

            this._context.SaveChanges();
        }
Esempio n. 2
0
        /// <summary>
        /// Insert into XMPost
        /// </summary>
        /// <param name="xmpost">XMPost</param>
        public void InsertXMPost(XMPost xmpost)
        {
            if (xmpost == null)
            {
                return;
            }

            if (!this._context.IsAttached(xmpost))
            {
                this._context.XMPosts.AddObject(xmpost);
            }

            this._context.SaveChanges();
        }