Example #1
0
        /// <summary>
        /// Update into CodeList
        /// </summary>
        /// <param name="codelist">CodeList</param>
        public void UpdateCodeList(CodeList codelist)
        {
            if (codelist == null)
            {
                return;
            }

            if (this._context.IsAttached(codelist))
            {
                this._context.CodeLists.Attach(codelist);
            }

            this._context.SaveChanges();
        }
Example #2
0
        /// <summary>
        /// Insert into CodeList
        /// </summary>
        /// <param name="codelist">CodeList</param>
        public void InsertCodeList(CodeList codelist)
        {
            if (codelist == null)
            {
                return;
            }

            if (!this._context.IsAttached(codelist))
            {
                this._context.CodeLists.AddObject(codelist);
            }

            this._context.SaveChanges();
        }