removed redundant ToList() calls and added line break after region

This commit is contained in:
Sean Garrett
2023-07-19 11:21:46 +01:00
parent 091ee9c204
commit 5ff1c21780
2 changed files with 3 additions and 2 deletions
@@ -138,6 +138,7 @@ namespace MongoDbGenericRepository
} }
#region Find And Update #region Find And Update
/// <inheritdoc /> /// <inheritdoc />
public virtual async Task<TDocument> GetAndUpdateOne<TDocument>( public virtual async Task<TDocument> GetAndUpdateOne<TDocument>(
FilterDefinition<TDocument> filter, FilterDefinition<TDocument> filter,
@@ -69,7 +69,7 @@ namespace MongoDbGenericRepository.DataAccess.Create
} }
else else
{ {
await GetCollection<TDocument, TKey>().InsertManyAsync(documentsList.ToList(), null, cancellationToken); await GetCollection<TDocument, TKey>().InsertManyAsync(documentsList, null, cancellationToken);
} }
} }
@@ -100,7 +100,7 @@ namespace MongoDbGenericRepository.DataAccess.Create
} }
else else
{ {
GetCollection<TDocument, TKey>().InsertMany(documentList.ToList(), cancellationToken: cancellationToken); GetCollection<TDocument, TKey>().InsertMany(documentList, cancellationToken: cancellationToken);
} }
} }