コード例 #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();
        }
コード例 #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();
        }