added tests for partitioned collections
This commit is contained in:
@@ -23,13 +23,6 @@ namespace MongoDbGenericRepository.Models
|
||||
[BsonId]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the property used for partitioning the collection
|
||||
/// This will not be inserted into the collection.
|
||||
/// This partition key will be prepended to the collection name to create a new collection.
|
||||
/// </summary>
|
||||
public string PartitionKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The datetime in UTC at which the document was added.
|
||||
/// </summary>
|
||||
@@ -40,4 +33,18 @@ namespace MongoDbGenericRepository.Models
|
||||
/// </summary>
|
||||
public int Version { get; set; }
|
||||
}
|
||||
|
||||
public class PartitionedDocument : Document, IPartitionedDocument
|
||||
{
|
||||
public PartitionedDocument(string partitionKey)
|
||||
{
|
||||
PartitionKey = partitionKey;
|
||||
}
|
||||
/// <summary>
|
||||
/// The name of the property used for partitioning the collection
|
||||
/// This will not be inserted into the collection.
|
||||
/// This partition key will be prepended to the collection name to create a new collection.
|
||||
/// </summary>
|
||||
public string PartitionKey { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user