diff --git a/CoreIntegrationTests/CoreIntegrationTests.csproj b/CoreIntegrationTests/CoreIntegrationTests.csproj
index 720179b..a3ba78f 100644
--- a/CoreIntegrationTests/CoreIntegrationTests.csproj
+++ b/CoreIntegrationTests/CoreIntegrationTests.csproj
@@ -9,16 +9,13 @@
+
-
-
-
-
..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Configuration.dll
diff --git a/CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.cs b/CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.cs
index 001521c..8c6fc2e 100644
--- a/CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.cs
+++ b/CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
@@ -1053,6 +1054,25 @@ namespace CoreIntegrationTests.Infrastructure
await SUT.DropIndexAsync(expectedIndexName, PartitionKey);
}
+ [Fact]
+ public async Task CreateCombinedTextIndexAsync()
+ {
+ // Arrange
+ const string expectedIndexName = "SomeContent2_text_SomeContent3_text";
+
+ // Act
+ Expression > ex = x => x.SomeContent2;
+ Expression > ex2 = x => x.SomeContent3;
+ var result = await SUT.CreateCombinedTextIndexAsync(new[] { ex, ex2 }, null, PartitionKey);
+
+ // Assert
+ var listOfIndexNames = await SUT.GetIndexesNamesAsync(PartitionKey);
+ Assert.Contains(expectedIndexName, listOfIndexNames);
+
+ // Cleanup
+ await SUT.DropIndexAsync(expectedIndexName, PartitionKey);
+ }
+
#endregion Index Management
#region Test Utils
diff --git a/CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.cs b/CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.cs
index dc3e54a..98376f5 100644
--- a/CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.cs
+++ b/CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
@@ -1046,6 +1047,25 @@ namespace CoreIntegrationTests.Infrastructure
await SUT.DropIndexAsync(expectedIndexName, PartitionKey);
}
+ [Fact]
+ public async Task CreateCombinedTextIndexAsync()
+ {
+ // Arrange
+ const string expectedIndexName = "SomeContent4_text_SomeContent5_text";
+
+ // Act
+ Expression> ex = x => x.SomeContent4;
+ Expression> ex2 = x => x.SomeContent5;
+ var result = await SUT.CreateCombinedTextIndexAsync(new[] { ex, ex2 }, null, PartitionKey);
+
+ // Assert
+ var listOfIndexNames = await SUT.GetIndexesNamesAsync(PartitionKey);
+ Assert.Contains(expectedIndexName, listOfIndexNames);
+
+ // Cleanup
+ await SUT.DropIndexAsync(expectedIndexName, PartitionKey);
+ }
+
#endregion Index Management
#region Test Utils
diff --git a/CoreIntegrationTests/Infrastructure/TestClasses.cs b/CoreIntegrationTests/Infrastructure/TestClasses.cs
index 9727da9..20b7fc2 100644
--- a/CoreIntegrationTests/Infrastructure/TestClasses.cs
+++ b/CoreIntegrationTests/Infrastructure/TestClasses.cs
@@ -50,6 +50,8 @@ namespace CoreIntegrationTests.Infrastructure
public int SomeValue { get; set; }
public string SomeContent { get; set; }
+ public string SomeContent2 { get; set; }
+ public string SomeContent3 { get; set; }
public int GroupingKey { get; set; }
@@ -78,6 +80,8 @@ namespace CoreIntegrationTests.Infrastructure
}
public string SomeContent { get; set; }
+ public string SomeContent4 { get; set; }
+ public string SomeContent5 { get; set; }
public Nested Nested { get; set; }
diff --git a/IntegrationTests/IntegrationTests.csproj b/IntegrationTests/IntegrationTests.csproj
index f64fc49..c5b56bc 100644
--- a/IntegrationTests/IntegrationTests.csproj
+++ b/IntegrationTests/IntegrationTests.csproj
@@ -31,32 +31,32 @@
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\DnsClient.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\DnsClient.dll
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\MongoDB.Bson.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\MongoDB.Bson.dll
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\MongoDB.Driver.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\MongoDB.Driver.dll
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\MongoDB.Driver.Core.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\MongoDB.Driver.Core.dll
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\MongoDbGenericRepository.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\MongoDbGenericRepository.dll
..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\System.Buffers.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\System.Buffers.dll
- ..\packages\MongoDbGenericRepository.1.3.7\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ ..\packages\MongoDbGenericRepository.1.3.8\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
diff --git a/IntegrationTests/packages.config b/IntegrationTests/packages.config
index a65fee1..94c72ae 100644
--- a/IntegrationTests/packages.config
+++ b/IntegrationTests/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/MongoDbGenericRepository/Abstractions/IMongoDbCollectionIndexRepository.cs b/MongoDbGenericRepository/Abstractions/IMongoDbCollectionIndexRepository.cs
new file mode 100644
index 0000000..01c0add
--- /dev/null
+++ b/MongoDbGenericRepository/Abstractions/IMongoDbCollectionIndexRepository.cs
@@ -0,0 +1,193 @@
+using MongoDbGenericRepository.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+
+namespace MongoDbGenericRepository
+{
+ ///
+ /// The repository interface for managing indexes
+ ///
+ public interface IMongoDbCollectionIndexRepository
+ {
+ ///
+ /// Create a text index on the given field.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateTextIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument;
+
+ ///
+ /// Create a text index on the given field.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateTextIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+
+ ///
+ /// Creates an index on the given field in ascending order.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateAscendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null) where TDocument : IDocument;
+
+ ///
+ /// Creates an index on the given field in ascending order.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateAscendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+
+ ///
+ /// Creates an index on the given field in descending order.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// A string containing the result of the operation.
+ Task CreateDescendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument;
+
+ ///
+ /// Creates an index on the given field in descending order.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateDescendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+
+ ///
+ /// Creates a hashed index on the given field.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// A string containing the result of the operation.
+ Task CreateHashedIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument;
+
+ ///
+ /// Creates a hashed index on the given field.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// The field we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateHashedIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+
+ ///
+ /// Creates a combined text index.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The fields we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateCombinedTextIndexAsync(IEnumerable>> fields, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument;
+
+ ///
+ /// Creates a combined text index.
+ /// IndexCreationOptions can be supplied to further specify
+ /// how the creation should be done.
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// The fields we want to index.
+ /// Options for creating an index.
+ /// An optional partition key.
+ /// The result of the create index operation.
+ Task CreateCombinedTextIndexAsync(IEnumerable>> fields, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+
+ ///
+ /// Drops the index given a field name
+ ///
+ /// The type representing a Document.
+ /// The name of the index
+ /// An optional partition key
+ Task DropIndexAsync(string indexName, string partitionKey = null)
+ where TDocument : IDocument;
+
+ ///
+ /// Drops the index given a field name
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// The name of the index
+ /// An optional partition key
+ Task DropIndexAsync(string indexName, string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+
+ ///
+ /// Returns the names of the indexes present on a collection.
+ ///
+ /// The type representing a Document.
+ /// An optional partition key
+ /// A list containing the names of the indexes on on the concerned collection.
+ Task> GetIndexesNamesAsync(string partitionKey = null)
+ where TDocument : IDocument;
+
+ ///
+ /// Returns the names of the indexes present on a collection.
+ ///
+ /// The type representing a Document.
+ /// The type of the primary key for a Document.
+ /// An optional partition key
+ /// A list containing the names of the indexes on on the concerned collection.
+ Task> GetIndexesNamesAsync(string partitionKey = null)
+ where TDocument : IDocument
+ where TKey : IEquatable;
+ }
+}
diff --git a/MongoDbGenericRepository/BaseMongoDbRepository.IndexManagement.cs b/MongoDbGenericRepository/BaseMongoDbRepository.IndexManagement.cs
index 0f4df54..440e143 100644
--- a/MongoDbGenericRepository/BaseMongoDbRepository.IndexManagement.cs
+++ b/MongoDbGenericRepository/BaseMongoDbRepository.IndexManagement.cs
@@ -8,191 +8,6 @@ using System.Linq;
namespace MongoDbGenericRepository
{
- ///
- /// The repository interface for managing indexes
- ///
- public interface IMongoDbCollectionIndexRepository
- {
- ///
- /// Create a text index on the given field.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateTextIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument;
-
- ///
- /// Create a text index on the given field.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateTextIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
-
- ///
- /// Creates an index on the given field in ascending order.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateAscendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null) where TDocument : IDocument;
-
- ///
- /// Creates an index on the given field in ascending order.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateAscendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
-
- ///
- /// Creates an index on the given field in descending order.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// A string containing the result of the operation.
- Task CreateDescendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument;
-
- ///
- /// Creates an index on the given field in descending order.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateDescendingIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
-
- ///
- /// Creates a hashed index on the given field.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// A string containing the result of the operation.
- Task CreateHashedIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument;
-
- ///
- /// Creates a hashed index on the given field.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// The field we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateHashedIndexAsync(Expression> field, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
-
- ///
- /// Creates a combined text index.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The fields we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateCombinedTextIndexAsync(IEnumerable>> fields, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument;
-
- ///
- /// Creates a combined text index.
- /// IndexCreationOptions can be supplied to further specify
- /// how the creation should be done.
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// The fields we want to index.
- /// Options for creating an index.
- /// An optional partition key.
- /// The result of the create index operation.
- Task CreateCombinedTextIndexAsync(IEnumerable>> fields, IndexCreationOptions indexCreationOptions = null, string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
-
- ///
- /// Drops the index given a field name
- ///
- /// The type representing a Document.
- /// The name of the index
- /// An optional partition key
- Task DropIndexAsync(string indexName, string partitionKey = null)
- where TDocument : IDocument;
-
- ///
- /// Drops the index given a field name
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// The name of the index
- /// An optional partition key
- Task DropIndexAsync(string indexName, string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
-
- ///
- /// Returns the names of the indexes present on a collection.
- ///
- /// The type representing a Document.
- /// An optional partition key
- /// A list containing the names of the indexes on on the concerned collection.
- Task> GetIndexesNamesAsync(string partitionKey = null)
- where TDocument : IDocument;
-
- ///
- /// Returns the names of the indexes present on a collection.
- ///
- /// The type representing a Document.
- /// The type of the primary key for a Document.
- /// An optional partition key
- /// A list containing the names of the indexes on on the concerned collection.
- Task> GetIndexesNamesAsync(string partitionKey = null)
- where TDocument : IDocument
- where TKey : IEquatable;
- }
-
///
/// The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
/// Its constructor must be given a connection string and a database name.
diff --git a/MongoDbGenericRepository/MongoDbGenericRepository.nuspec b/MongoDbGenericRepository/MongoDbGenericRepository.nuspec
index 44154e1..6610a28 100644
--- a/MongoDbGenericRepository/MongoDbGenericRepository.nuspec
+++ b/MongoDbGenericRepository/MongoDbGenericRepository.nuspec
@@ -2,7 +2,7 @@
MongoDbGenericRepository
- 1.3.7
+ 1.3.8
MongoDb Generic Repository
Alexandre Spieser
Alexandre Spieser
@@ -10,7 +10,7 @@
https://github.com/alexandre-spieser/mongodb-generic-repository
false
A generic repository implementation using the MongoDB C# Sharp 2.0 driver.
- Upgraded dependencies. Full support for bulk insertion and deletion of documents of the same type but with different partitionkey values. Added methods for Min and Max queries.
+ Release notes are at https://github.com/alexandre-spieser/mongodb-generic-repository/releases
Copyright 2018 (c) Alexandre Spieser. All rights reserved.
MongoDb Repository Generic NoSql
diff --git a/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.dll b/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.dll
index 4af4809..901f74a 100644
Binary files a/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.dll and b/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.dll differ
diff --git a/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.xml b/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.xml
index bfd5e60..aa5ec45 100644
--- a/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.xml
+++ b/MongoDbGenericRepository/lib/net45/MongoDbGenericRepository.xml
@@ -569,6 +569,170 @@
The projected group result.
The partition key of your document, if any.
+
+
+ The repository interface for managing indexes
+
+
+
+
+ Create a text index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Create a text index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in ascending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in ascending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in descending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ A string containing the result of the operation.
+
+
+
+ Creates an index on the given field in descending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a hashed index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ A string containing the result of the operation.
+
+
+
+ Creates a hashed index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a combined text index.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The fields we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a combined text index.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The fields we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Drops the index given a field name
+
+ The type representing a Document.
+ The name of the index
+ An optional partition key
+
+
+
+ Drops the index given a field name
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The name of the index
+ An optional partition key
+
+
+
+ Returns the names of the indexes present on a collection.
+
+ The type representing a Document.
+ An optional partition key
+ A list containing the names of the indexes on on the concerned collection.
+
+
+
+ Returns the names of the indexes present on a collection.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ An optional partition key
+ A list containing the names of the indexes on on the concerned collection.
+
This is the interface of the IMongoDbContext which is managed by the .
@@ -989,6 +1153,10 @@
The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
Its constructor must be given a connection string and a database name.
+
+ The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
+ Its constructor must be given a connection string and a database name.
+
@@ -1585,6 +1753,48 @@
The document type.
The document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This class represents a basic document that can be stored in MongoDb.
@@ -1634,6 +1844,81 @@
Your document must implement this class in order for the MongoDbRepository to handle them.
+
+
+ Options for creating an index.
+
+
+
+
+ Gets or sets a value indicating whether the index is a unique index.
+
+
+
+
+ Gets or sets the index version for text indexes.
+
+
+
+
+ Gets or sets the index version for 2dsphere indexes.
+
+
+
+
+ Gets or sets a value indicating whether the index is a sparse index.
+
+
+
+
+ Gets or sets the index name.
+
+
+
+
+ Gets or sets the min value for 2d indexes.
+
+
+
+
+ Gets or sets the max value for 2d indexes.
+
+
+
+
+ Gets or sets the language override.
+
+
+
+
+ Gets or sets when documents expire (used with TTL indexes).
+
+
+
+
+ Gets or sets the default language.
+
+
+
+
+ Gets or sets the size of a geohash bucket.
+
+
+
+
+ Gets or sets the precision, in bits, used with geohash indexes.
+
+
+
+
+ Gets or sets a value indicating whether to create the index in the background.
+
+
+
+
+ Gets or sets the version of the index.
+
+
This class represents a document that can be inserted in a collection that can be partitioned.
diff --git a/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.dll b/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.dll
index 2ad890d..0b548bc 100644
Binary files a/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.dll and b/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.dll differ
diff --git a/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.xml b/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.xml
index bfd5e60..aa5ec45 100644
--- a/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.xml
+++ b/MongoDbGenericRepository/lib/netstandard1.5/MongoDbGenericRepository.xml
@@ -569,6 +569,170 @@
The projected group result.
The partition key of your document, if any.
+
+
+ The repository interface for managing indexes
+
+
+
+
+ Create a text index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Create a text index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in ascending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in ascending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in descending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ A string containing the result of the operation.
+
+
+
+ Creates an index on the given field in descending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a hashed index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ A string containing the result of the operation.
+
+
+
+ Creates a hashed index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a combined text index.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The fields we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a combined text index.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The fields we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Drops the index given a field name
+
+ The type representing a Document.
+ The name of the index
+ An optional partition key
+
+
+
+ Drops the index given a field name
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The name of the index
+ An optional partition key
+
+
+
+ Returns the names of the indexes present on a collection.
+
+ The type representing a Document.
+ An optional partition key
+ A list containing the names of the indexes on on the concerned collection.
+
+
+
+ Returns the names of the indexes present on a collection.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ An optional partition key
+ A list containing the names of the indexes on on the concerned collection.
+
This is the interface of the IMongoDbContext which is managed by the .
@@ -989,6 +1153,10 @@
The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
Its constructor must be given a connection string and a database name.
+
+ The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
+ Its constructor must be given a connection string and a database name.
+
@@ -1585,6 +1753,48 @@
The document type.
The document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This class represents a basic document that can be stored in MongoDb.
@@ -1634,6 +1844,81 @@
Your document must implement this class in order for the MongoDbRepository to handle them.
+
+
+ Options for creating an index.
+
+
+
+
+ Gets or sets a value indicating whether the index is a unique index.
+
+
+
+
+ Gets or sets the index version for text indexes.
+
+
+
+
+ Gets or sets the index version for 2dsphere indexes.
+
+
+
+
+ Gets or sets a value indicating whether the index is a sparse index.
+
+
+
+
+ Gets or sets the index name.
+
+
+
+
+ Gets or sets the min value for 2d indexes.
+
+
+
+
+ Gets or sets the max value for 2d indexes.
+
+
+
+
+ Gets or sets the language override.
+
+
+
+
+ Gets or sets when documents expire (used with TTL indexes).
+
+
+
+
+ Gets or sets the default language.
+
+
+
+
+ Gets or sets the size of a geohash bucket.
+
+
+
+
+ Gets or sets the precision, in bits, used with geohash indexes.
+
+
+
+
+ Gets or sets a value indicating whether to create the index in the background.
+
+
+
+
+ Gets or sets the version of the index.
+
+
This class represents a document that can be inserted in a collection that can be partitioned.
diff --git a/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.dll b/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.dll
index 74a53ea..0136220 100644
Binary files a/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.dll and b/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.dll differ
diff --git a/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.xml b/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.xml
index bfd5e60..aa5ec45 100644
--- a/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.xml
+++ b/MongoDbGenericRepository/lib/netstandard2.0/MongoDbGenericRepository.xml
@@ -569,6 +569,170 @@
The projected group result.
The partition key of your document, if any.
+
+
+ The repository interface for managing indexes
+
+
+
+
+ Create a text index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Create a text index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in ascending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in ascending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates an index on the given field in descending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ A string containing the result of the operation.
+
+
+
+ Creates an index on the given field in descending order.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a hashed index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ A string containing the result of the operation.
+
+
+
+ Creates a hashed index on the given field.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The field we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a combined text index.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The fields we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Creates a combined text index.
+ IndexCreationOptions can be supplied to further specify
+ how the creation should be done.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The fields we want to index.
+ Options for creating an index.
+ An optional partition key.
+ The result of the create index operation.
+
+
+
+ Drops the index given a field name
+
+ The type representing a Document.
+ The name of the index
+ An optional partition key
+
+
+
+ Drops the index given a field name
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ The name of the index
+ An optional partition key
+
+
+
+ Returns the names of the indexes present on a collection.
+
+ The type representing a Document.
+ An optional partition key
+ A list containing the names of the indexes on on the concerned collection.
+
+
+
+ Returns the names of the indexes present on a collection.
+
+ The type representing a Document.
+ The type of the primary key for a Document.
+ An optional partition key
+ A list containing the names of the indexes on on the concerned collection.
+
This is the interface of the IMongoDbContext which is managed by the .
@@ -989,6 +1153,10 @@
The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
Its constructor must be given a connection string and a database name.
+
+ The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
+ Its constructor must be given a connection string and a database name.
+
@@ -1585,6 +1753,48 @@
The document type.
The document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This class represents a basic document that can be stored in MongoDb.
@@ -1634,6 +1844,81 @@
Your document must implement this class in order for the MongoDbRepository to handle them.
+
+
+ Options for creating an index.
+
+
+
+
+ Gets or sets a value indicating whether the index is a unique index.
+
+
+
+
+ Gets or sets the index version for text indexes.
+
+
+
+
+ Gets or sets the index version for 2dsphere indexes.
+
+
+
+
+ Gets or sets a value indicating whether the index is a sparse index.
+
+
+
+
+ Gets or sets the index name.
+
+
+
+
+ Gets or sets the min value for 2d indexes.
+
+
+
+
+ Gets or sets the max value for 2d indexes.
+
+
+
+
+ Gets or sets the language override.
+
+
+
+
+ Gets or sets when documents expire (used with TTL indexes).
+
+
+
+
+ Gets or sets the default language.
+
+
+
+
+ Gets or sets the size of a geohash bucket.
+
+
+
+
+ Gets or sets the precision, in bits, used with geohash indexes.
+
+
+
+
+ Gets or sets a value indicating whether to create the index in the background.
+
+
+
+
+ Gets or sets the version of the index.
+
+
This class represents a document that can be inserted in a collection that can be partitioned.