21.35. Interface IMongoDataModelMapping<T>
Namespace: ArmoniK.Core.Adapters.MongoDB.Common
Assembly: ArmoniK.Core.Adapters.MongoDB.dll
Defines the contract for mapping a data model to a MongoDB collection.
public interface IMongoDataModelMapping<T>
21.35.1. Type Parameters
T
The type of the data model.
21.35.2. Properties
21.35.2.1. CollectionName
Gets the name of the MongoDB collection associated with the data model.
string CollectionName { get; }
21.35.2.1.1. Property Value
21.35.3. Methods
21.35.3.1. InitializeCollectionAsync(IClientSessionHandle, IMongoCollection<T>, InitDatabase)
Insert data into the collection after its creation. Can be called multiple times
Task InitializeCollectionAsync(IClientSessionHandle sessionHandle, IMongoCollection<T> collection, InitDatabase initDatabase)
21.35.3.1.1. Parameters
sessionHandle IClientSessionHandle
MongoDB Client session
collection IMongoCollection<T>
MongoDDB Collection in which to insert data
initDatabase InitDatabase
Data to insert
21.35.3.1.2. Returns
Task representing the asynchronous execution of the method
21.35.3.2. InitializeIndexesAsync(IClientSessionHandle, IMongoCollection<T>, MongoDB)
Setup indexes for the collection Can be called multiple times
Task InitializeIndexesAsync(IClientSessionHandle sessionHandle, IMongoCollection<T> collection, MongoDB options)
21.35.3.2.1. Parameters
sessionHandle IClientSessionHandle
MongoDB Client session
collection IMongoCollection<T>
MongoDDB Collection in which to insert data
options MongoDB
Options for MongoDB
21.35.3.2.2. Returns
Task representing the asynchronous execution of the method