fixed various warnings

This commit is contained in:
Sean Garrett
2023-06-11 20:23:44 +01:00
parent 14e261261c
commit 02b9385fd8
30 changed files with 245 additions and 655 deletions
@@ -5,12 +5,14 @@ using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using MongoDB.Driver;
using MongoDB.Driver.Linq;
using MongoDbGenericRepository.DataAccess.Base;
using MongoDbGenericRepository.Models;
namespace MongoDbGenericRepository.DataAccess.Read
{
/// <summary>
/// A interface for accessing the Database and its Collections.
/// </summary>
public interface IMongoDbReader : IDataAccessBase
{
/// <summary>
@@ -582,50 +584,5 @@ namespace MongoDbGenericRepository.DataAccess.Read
string partitionKey = null)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
/// <summary>
/// Gets a IMongoQueryable for a potentially partitioned document type and a filter.
/// </summary>
/// <typeparam name="TDocument">The document type.</typeparam>
/// <typeparam name="TKey">The type of the primary key.</typeparam>
/// <param name="filter">The filter definition.</param>
/// <param name="partitionKey">The collection partition key.</param>
/// <returns></returns>
IMongoQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
/// <summary>
/// Gets a collections for a potentially partitioned document type.
/// </summary>
/// <typeparam name="TDocument">The document type.</typeparam>
/// <typeparam name="TKey">The type of the primary key.</typeparam>
/// <param name="document">The document.</param>
/// <returns></returns>
IMongoCollection<TDocument> HandlePartitioned<TDocument, TKey>(TDocument document)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
/// <summary>
/// Gets a collections for a potentially partitioned document type.
/// </summary>
/// <typeparam name="TDocument">The document type.</typeparam>
/// <typeparam name="TKey">The type of the primary key.</typeparam>
/// <param name="partitionKey">The collection partition key.</param>
/// <returns></returns>
IMongoCollection<TDocument> HandlePartitioned<TDocument, TKey>(string partitionKey)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
/// <summary>
/// Gets a collections for the type TDocument with a partition key.
/// </summary>
/// <typeparam name="TDocument">The document type.</typeparam>
/// <typeparam name="TKey">The type of the primary key.</typeparam>
/// <param name="partitionKey">The collection partition key.</param>
/// <returns></returns>
IMongoCollection<TDocument> GetCollection<TDocument, TKey>(string partitionKey = null)
where TDocument : IDocument<TKey>
where TKey : IEquatable<TKey>;
}
}