Update README.md

This commit is contained in:
Alexandre SPIESER
2019-04-15 00:48:19 +01:00
committed by GitHub
parent 1826668cea
commit 67d0a4c8a3
+2 -2
View File
@@ -40,8 +40,8 @@ Here is an example of repository usage, where the TestRepository is implementing
} }
} }
``` ```
If all your documents have the same type of key, you can use the more specific `BaseMongoRepository<TKey>` where `TKey` is the type of the `Id` of your documents. If all your documents have the same type of `Id`, you can use the more specific `BaseMongoRepository<TKey>` where `TKey` is the type of the `Id` of your documents.
``` ```csharp
public class TestTKeyRepository<TKey> : BaseMongoRepository<TKey>, ITestRepository<TKey> where TKey : IEquatable<TKey> public class TestTKeyRepository<TKey> : BaseMongoRepository<TKey>, ITestRepository<TKey> where TKey : IEquatable<TKey>
{ {
const string connectionString = "mongodb://localhost:27017/MongoDbTests"; const string connectionString = "mongodb://localhost:27017/MongoDbTests";