MongoRepositoryManager(T, TKey) Class

MongoRepository

MongoRepositoryManagerT, TKey Class
Deals with the collections of entities in MongoDb. This class tries to hide as much MongoDb-specific details as possible but it's not 100% *yet*. It is a very thin wrapper around most methods on MongoDb's MongoCollection objects.
Inheritance Hierarchy
SystemObject  MongoRepositoryMongoRepositoryManagerT, TKey
    MongoRepositoryMongoRepositoryManagerT

Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
public class MongoRepositoryManager<T, TKey> : IRepositoryManager<T, TKey>
where T : Object, IEntity<TKey>
Public Class MongoRepositoryManager(Of T As {Object, IEntity(Of TKey)}, TKey)
	Implements IRepositoryManager(Of T, TKey)
generic<typename T, typename TKey>
where T : Object, IEntity<TKey>
public ref class MongoRepositoryManager : IRepositoryManager<T, TKey>
type MongoRepositoryManager<'T, 'TKey when 'T : Object and IEntity<'TKey>> =  
    class
        interface IRepositoryManager<'T, 'TKey>
    end

Type Parameters

T
The type contained in the repository to manage.
TKey
The type used for the entity's Id.

The MongoRepositoryManagerT, TKey type exposes the following members.

Constructors
  NameDescription
Public methodMongoRepositoryManagerT, TKey
Initializes a new instance of the MongoRepositoryManager class. Uses the Default App/Web.Config connectionstrings to fetch the connectionString and Database name.
Public methodMongoRepositoryManagerT, TKey(String)
Initializes a new instance of the MongoRepositoryManager class.
Public methodMongoRepositoryManagerT, TKey(String, String)
Initializes a new instance of the MongoRepositoryManager class.
Top
Properties
  NameDescription
Public propertyExists
Gets a value indicating whether the collection already exists.
Public propertyName
Gets the name of the collection as Mongo uses.
Top
Methods
  NameDescription
Public methodDrop
Drops the collection.
Public methodDropAllIndexes
Drops all indexes on this repository.
Public methodDropIndex
Drops specified index on the repository.
Public methodDropIndexes
Drops specified indexes on the repository.
Public methodEnsureIndex(String)
Ensures that the desired index exist and creates it if it doesn't exist.
Public methodEnsureIndex(String, Boolean, Boolean, Boolean)
Ensures that the desired index exist and creates it if it doesn't exist.
Public methodEnsureIndexes(IEnumerableString)
Ensures that the desired indexes exist and creates them if they don't exist.
Public methodEnsureIndexes(IMongoIndexKeys, IMongoIndexOptions)
Ensures that the desired indexes exist and creates them if they don't exist.
Public methodEnsureIndexes(IEnumerableString, Boolean, Boolean, Boolean)
Ensures that the desired indexes exist and creates them if they don't exist.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIndexes
Gets the indexes for this repository.
Public methodGetStats
Gets stats for this repository.
Public methodGetTotalDataSize Obsolete.
Gets the total size for the repository (data + indexes).
Public methodGetTotalStorageSize Obsolete.
Gets the total storage size for the repository (data + indexes).
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexesExists
Tests whether indexes exist.
Public methodIndexExists
Tests whether indexes exist.
Public methodIsCapped
Tests whether the repository is capped.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReIndex
Runs the ReIndex command on this repository.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validates the integrity of the repository.
Top
See Also