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

            if (this._context.IsAttached(xmactivity))
            {
                this._context.XMActivities.Attach(xmactivity);
            }

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

            if (!this._context.IsAttached(xmactivity))
            {
                this._context.XMActivities.AddObject(xmactivity);
            }

            this._context.SaveChanges();
        }