From 5827b5de9a48a8643bcc266b4ef69a0460450719 Mon Sep 17 00:00:00 2001 From: Alexandre SPIESER Date: Sun, 3 Sep 2017 19:07:58 +0100 Subject: [PATCH 1/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75479cc..dd894ff 100644 --- a/README.md +++ b/README.md @@ -85,14 +85,14 @@ To use partitioned collections, you must define your documents using the Partiti ``` This partitioned key will be used as a prefix to your collection name. -The collection name is derived from the name of the type of your document, is set to lower case, and is currently very naively pluralized (a "s" is added at the end of the type name). +The collection name is derived from the name of the type of your document, is set to camel case, and is pluralized using a class taken from Humanizer (https://github.com/Humanizr/Humanizer). ``` var myDoc = new MyPartitionedDocument("myPartitionKey"); _testRepository.AddOne(myDoc); ``` -The above code will generate a collection named `myPartitionKey-mypartitioneddocuments`. +The above code will generate a collection named `myPartitionKey-myPartitionedDocuments`. Please refer to the IntegrationTests project for more usage examples. From 8fc45cd975b3ade4a180b684ee00b2e72012c9b0 Mon Sep 17 00:00:00 2001 From: Alexandre SPIESER Date: Sun, 3 Sep 2017 19:25:01 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index dd894ff..b021af2 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,42 @@ Copyright © 2017 ## License mongodb-generic-repository is under MIT license - http://www.opensource.org/licenses/mit-license.php +The MIT License (MIT) + +Copyright (c) 2016-2017 Alexandre Spieser + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================================== + +Inflector (https://github.com/srkirkland/Inflector) +The MIT License (MIT) +Copyright (c) 2013 Scott Kirkland + +============================================================================== + +Humanizer (https://github.com/Humanizr/Humanizer) +The MIT License (MIT) +Copyright (c) 2012-2014 Mehdi Khalili (http://omar.io) + +============================================================================== + ## Author **Alexandre Spieser** From 8044ec8e563084b06ece5589b885e1f905770938 Mon Sep 17 00:00:00 2001 From: Alexandre SPIESER Date: Sun, 3 Sep 2017 19:31:27 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b021af2..3a3ea1b 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,12 @@ Here is an example of repository usage, where the TestRepository is implementing public void DropTestCollection() { - _mongoDbContext.DropCollection(); + MongoDbContext.DropCollection(); } public void DropTestCollection(string partitionKey) { - _mongoDbContext.DropCollection(partitionKey); + MongoDbContext.DropCollection(partitionKey); } } ```