EfRepository.cs - Why are some lines commented out in the source code?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
Specifically, why are the following lines commented out?


        public void Update(T entity)
        {
            if (entity == null)
                throw new ArgumentNullException("entity");

            //if (!this._context.IsAttached(entity))
            //    this._entities.Attach(entity);

            this._context.SaveChanges();
        }

        public void Delete(T entity)
        {
            if (entity == null)
                throw new ArgumentNullException("entity");

            //if (!this._context.IsAttached(entity))
            //    this._entities.Attach(entity);

            this._entities.Remove(entity);

            this._context.SaveChanges();
        }
Hace 12 años
Because they're not required
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.