Csla 6 fluent configuration - should the DataPortal() method return CslaOptions? #2691
Unanswered
TheCakeMonster
asked this question in
Ideas
Replies: 1 comment 1 reply
-
I also got hung up on what you mention. It's OK, just a bit of a speed bump. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be better if the DataPortal() method returned CslaOptions?
I do not think what I am suggesting was the intention of this method. I think the whole point of it was to offer a more fluent and discoverable mechanism for performing configuration. However, this fluency comes at the cost of ease of use; because DataPortal() returns a subset of configuration, it is not possible to chain other top level configuration methods after it.
We already have the opportunity to write this using an action - a nested lambda - as follows:
So does DataPortal() returning the subtype DataPortalClientOptions help or hinder configuration?
I think I've been getting myself confused about where certain configurations are because AddServerSideDataPortal() can be accessed both ways.
This would be a breaking change for existing users; however, since we've already changed the configuration setup in Csla 6 a fair bit it doesn't seem too unreasonable to do this - if it is considered sufficiently beneficial.
Beta Was this translation helpful? Give feedback.
All reactions