Example #1
0
 public void Add(TEntity entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException(nameof(entity), "Item cannot be null!");
     }
     Entities.Add(entity);
     ChangeTracker.Add(entity);
 }
Example #2
0
        public void Add(TEntity item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item),
                                                "Item cannot be null!");
            }

            this.Entities.Add(item);

            ChangeTracker.Add(item);
        }