using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Linq.Expressions;
using MongoDbGenericRepository.Models;
using System.Linq;
namespace MongoDbGenericRepository
{
///
/// The IBaseMongoRepository exposes the CRUD functionality of the BaseMongoRepository.
///
public interface IBaseMongoRepository :
IReadOnlyMongoRepository,
IBaseMongoRepository_Create,
IBaseMongoRepository_Update,
IBaseMongoRepository_Delete,
IBaseMongoRepository_Index
{
///
/// Asynchronously returns a paginated list of the documents matching the filter condition.
///
/// The type representing a Document.
///
/// The number of documents you want to skip. Default value is 0.
/// The number of documents you want to take. Default value is 50.
/// An optional partition key.
Task> GetPaginatedAsync(Expression> filter, int skipNumber = 0, int takeNumber = 50, string partitionKey = null)
where TDocument : IDocument;
///
/// Asynchronously returns a paginated list of the documents matching the filter condition.
///
/// The type representing a Document.
/// The type of the primary key for a Document.
///
/// The number of documents you want to skip. Default value is 0.
/// The number of documents you want to take. Default value is 50.
/// An optional partition key.
Task> GetPaginatedAsync(Expression> filter, int skipNumber = 0, int takeNumber = 50, string partitionKey = null)
where TDocument : IDocument
where TKey : IEquatable;
///
/// GetAndUpdateOne with filter
///
/// The type representing a Document.
///
///
///
///
Task GetAndUpdateOne(FilterDefinition filter, UpdateDefinition update, FindOneAndUpdateOptions options)
where TDocument : IDocument;
///
/// GetAndUpdateOne with filter
///
/// The type representing a Document.
/// The type of the primary key for a Document.
///
///
///
///
Task GetAndUpdateOne(FilterDefinition filter, UpdateDefinition update, FindOneAndUpdateOptions options)
where TDocument : IDocument
where TKey : IEquatable;
}
}