Hi guys:
I’ve been using SharpRepository for the last year and a half, and before everything else, let me congratulate you guys for this fine piece of code.
I have a question about CompoundKey entities, is there a way to not use the RepositoryPrimaryKey
Attribute in my entity, and resolve by convetion.
I was reading your DefaultRepositoryConventions.GetPrimaryKeyName and the CompoundKeyRepositoryBase.GetPrimaryKeys, and as far as I understand, the conventions method stops as soon as it finds the first property that meets the Id or EntityTypeName+ Id convention, and in the CompoundKeyRepositoryBase method, it only uses the RepositoryPrimaryKey attribute in order to find the primary key.
Would be possible to have a compound key convention kind of, so that it allows me to have a “clean” and independent Business model. A Business model away for any kind of storage-like attributes.
I mean if I would like to distribute my model as nuget package, just as an example, I must add a reference to SharpRepository.Repository if I use the RepositoryPrimaryKey, therefore, my model would become coupled to your library.
I hope this question will make sense to you.
Best regards,
David