Closed windNight closed 4 years ago
While I always welcome contributions, I am not sure I can see the purpose of this PR. In my humble opinion PartitionKeys should be handled by IPartitioned document, not passed directly in the argument and then overwritten inside if the document is IPartitioned document. This does not make much sense to me, as it will remove the standardization of partition management. ICustomDataAccess is also a code smell in a repo that's designed to be generic. Also, your mongodb database password can be seen in the git history... I mean no offence, but for the sake of everyone using this repo in production, we need a lot more justifications for those changes.
It looks like you're forcing your custom implementation for your needs into something that's generic. Your contributed implementation is inheriting from BaseMongoRepository, is custom and should be kept in your code. I cannot simply accept everyone's implementation inheriting from BaseMongoRepository. It's great that you're building something custom based on BaseMongoRepository for your needs, but most of that functionality is for your application only.
1、add DefaultBaseMongodbRepository with Tests 2、add partitionKey in KeyTypedRepository