using MongoDB.Driver;
using MongoDbGenericRepository.Models;
using System;
namespace MongoDbGenericRepository
{
///
/// This is the interface of the IMongoDbContext which is managed by the .
///
public interface IMongoDbContext
{
///
/// The IMongoClient from the official MongoDb driver
///
IMongoClient Client { get; }
///
/// The IMongoDatabase from the official Mongodb driver
///
IMongoDatabase Database { get; }
///
/// The private GetCollection method
///
///
IMongoCollection GetCollection();
///
/// Returns a collection for a document type that has a partition key.
///
///
/// The value of the partition key.
IMongoCollection GetCollection(string partitionKey) where TDocument : IDocument;
///
/// Returns a collection for a document type that has a partition key.
///
/// The type representing a Document.
/// The type of the primary key for a Document.
/// The value of the partition key.
IMongoCollection GetCollection(string partitionKey)
where TDocument : IDocument
where TKey : IEquatable;
///
/// Drops a collection, use very carefully.
///
///
void DropCollection();
///
/// Drops a collection having a partitionkey, use very carefully.
///
///
void DropCollection(string partitionKey);
///
/// Sets the Guid representation of the MongoDb Driver.
///
/// The new value of the GuidRepresentation
void SetGuidRepresentation(MongoDB.Bson.GuidRepresentation guidRepresentation);
}
}