Skip to content

Commit 8c54730

Browse files
committed
roling back
1 parent ad85fbd commit 8c54730

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/CodeChavez.Repository.Pattern.MongoDB/CodeChavez.Repository.Pattern.MongoDB.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Title>CodeChavez Repository Pattern MongoDB Library</Title>
1010
<Authors>Victor A Chavez</Authors>
1111
<Product>CodeChavez.Repository.Pattern.MongoDB</Product>
12-
<Version>10.0.0-preview2</Version>
12+
<Version>10.0.0-preview3</Version>
1313
<Copyright>2020-2026</Copyright>
1414
<Description>Has some useful extension and utilities that allow for every day development</Description>
1515
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>

src/CodeChavez.Repository.Pattern.MongoDB/MongoRepository.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,9 @@ public async Task AddRangeAsync(IEnumerable<TEntity> entities, CancellationToken
4141
if (entities == null)
4242
throw new ArgumentNullException(nameof(entities));
4343

44-
if (!entities.Any())
45-
throw new ArgumentException("The collection of entities cannot be empty.", nameof(entities));
46-
4744
_dbContext.Set<TEntity>().AddRange(entities);
4845

49-
_dbContext.Database.AutoTransactionBehavior = AutoTransactionBehavior.WhenNeeded;
46+
_dbContext.Database.AutoTransactionBehavior = AutoTransactionBehavior.Never;
5047
await _dbContext.SaveChangesAsync(cancellationToken);
5148
}
5249

0 commit comments

Comments
 (0)