What I usually do is just an abstract configuration using interfaces, for example. IBillingConfiguration , IReportConfiguration , etc. The implementation of this data is then transferred to the appropriate methods (or entered into the appropriate objects).
In cases where the values ββcome from this, it really does not matter. There are times when I use the repository when storing values ββin a database, and then I have something like IConfigurationPropertyRepository . This is somewhat inconvenient, as ConfiruationProperty doesn't quite feel like a first-class citizen in the Entity world, but seems to be doing its job.
I would return some implementation of IBillingConfiguration , which simply gets the required property from the base collection or ConfigurationProperty objects.
The corresponding Get and Save methods for each I{Some}Configuration will be implemented on the ConfigurationPropertyRepository , so I only get / save this subset of the properties that need to be applied.
source share