upgrade to MongoDb Driver 2.18 - 2.19 seems to have some broken some tests, investigating.

This commit is contained in:
Alexandre Spieser committed 2023-08-02 22:56:58 +01:00
1 parent 9812bded04
commit 710b7b992f
12 files changed
+96 -48

No files matched your search

@@ -23,20 +23,5 @@ namespace IntegrationTests.Infrastructure
{
MongoDbContext.DropCollection<TDocument>(partitionKey);
}
/// <summary>
/// Gets the max of a property in a mongodb collections that is satisfying the filter.
/// </summary>
/// <typeparam name="TDocument">The document type.</typeparam>
/// <typeparam name="TKey">The type of the primary key.</typeparam>
/// <returns></returns>
public async Task<TDocument> GetByMaxAsync<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, Expression<Func<TDocument, object>> orderByDescending)
where TDocument : IDocument<TKey>
where TKey : System.IEquatable<TKey>
{
return await GetCollection<TDocument, TKey>().Find(Builders<TDocument>.Filter.Where(filter))
.SortByDescending(orderByDescending)
.FirstOrDefaultAsync();
}
}
}