-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read CSLA config values from .NET Core config subsystem #967
Comments
My understanding is that the .NET Core config subsystem takes the names of your settings (like you have in the json @itgoran) and flattens them for use in ENV variables or other scenarios. I don't know the exact algorithm, but something like They use a precedence scheme (I don't remember the specifics) so they'll read the value from the config file, ENV variables, and maybe other sources, and there are rules as to which values ultimately "win" - which overrides the others. In the end, the code throughout CSLA itself uses So it seems to me that what we need to do is load the values from the .NET Core config subsystem, then map those values into the pre-defined That doesn't seem too difficult. |
I assembled a list of the settings keys: CslaAuthentication The new fluent types in |
Great @rockfordlhotka , I was doing exactly the same thing.
or |
I like it without the CSLA prefix - much cleaner. Also, if we sub-group things like in the fluent API then (excuse my poor json): "csla": {
"dataportal": {
"AutoCloneOnUpdate":"..."
},
"Authentication":"windows",
"AuthorizationProvider":"...",
} Is that possible? |
Yes, it is. Also, additional 'grouping' for 'PropertyChanged' and 'DefaultTransaction' can be performed.
|
Again, I'd like the fluent API and this json model to line up. Right now I've broken the fluent API into fairly coarse groups https://github.com/MarimerLLC/csla/tree/master/Source/Csla.Shared/Configuration The groups are based on the subsystem of CSLA that uses/needs the config setting value. |
This is a good idea, though unfortunately some of the config values are overloaded in their meaning. For example,
|
Load configuration for csla using 'csla' section from appsettings.json file. Add tests for testing configurations.
All configurations are written into ConfigurationManager.AppSettings Add clean context before and after tests
…ndency references.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
CSLA should have its own configuration section in
appsettings.json
file for this and further configurations.Example (just a few of them):
Beside fluent interface, existing configuration mechanism implemented in .NET Core can be used to read from
appsettings.json
and other sources supported by .NET Core.The text was updated successfully, but these errors were encountered: