Ejemplo n.º 1
0
        /// <summary>
        /// Update into XMProject
        /// </summary>
        /// <param name="xmproject">XMProject</param>
        public void UpdateXMProject(XMProject xmproject)
        {
            if (xmproject == null)
            {
                return;
            }

            if (this._context.IsAttached(xmproject))
            {
                this._context.XMProjects.Attach(xmproject);
            }

            this._context.SaveChanges();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Insert into XMProject
        /// </summary>
        /// <param name="xmproject">XMProject</param>
        public void InsertXMProject(XMProject xmproject)
        {
            if (xmproject == null)
            {
                return;
            }

            if (!this._context.IsAttached(xmproject))
            {
                this._context.XMProjects.AddObject(xmproject);
            }

            this._context.SaveChanges();
        }