Exemple #1
0
        public void UpdateAreaCode(AreaCode entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("codeList");
            }
            if (!_context.IsAttached(entity))
            {
                _context.AreaCodes.Attach(entity);
            }

            _context.SaveChanges();
        }
Exemple #2
0
        public void InsertAreaCode(AreaCode entity)
        {
            if (entity == null)
            {
                return;
            }

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

            this._context.SaveChanges();
        }