示例#1
0
        /// <summary>
        /// Update into AreaCode
        /// </summary>
        /// <param name="areacode">AreaCode</param>
        public void UpdateAreaCode(AreaCode areacode)
        {
            if (areacode == null)
            {
                return;
            }

            if (this._context.IsAttached(areacode))
            {
                this._context.AreaCodes.Attach(areacode);
            }

            this._context.SaveChanges();
        }
示例#2
0
        /// <summary>
        /// Insert into AreaCode
        /// </summary>
        /// <param name="areacode">AreaCode</param>
        public void InsertAreaCode(AreaCode areacode)
        {
            if (areacode == null)
            {
                return;
            }

            if (!this._context.IsAttached(areacode))
            {
                this._context.AreaCodes.AddObject(areacode);
            }

            this._context.SaveChanges();
        }