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

            if (this._context.IsAttached(xmactivitytype))
            {
                this._context.XMActivityTypes.Attach(xmactivitytype);
            }

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

            if (!this._context.IsAttached(xmactivitytype))
            {
                this._context.XMActivityTypes.AddObject(xmactivitytype);
            }

            this._context.SaveChanges();
        }