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

            if (this._context.IsAttached(xmquestion))
            {
                this._context.XMQuestions.Attach(xmquestion);
            }

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

            if (!this._context.IsAttached(xmquestion))
            {
                this._context.XMQuestions.AddObject(xmquestion);
            }

            this._context.SaveChanges();
        }