Skip to content

Migrating to Csla 6 - Static permissions methods #3598

Discussion options

You must be logged in to vote

Most apps I've built over the last several years have used a sort of MVVM approach, and the viewmodel is an instance that knows the type of the domain object (Model). Because of this, the viewmodel can ask for type-level rules like CanExecuteObject, and expose the result to the UI.

The rules should stay in the business domain class, absolutely!

What's usually needed is an object that can be used by the UI to ask those questions - and the viewmodel (or similar) is that object.

Another example (in XAML and Blazor) is the PropertyInfo UI component, that answers those questions on a per-property basis.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ajohnstone-ks
Comment options

Answer selected by ajohnstone-ks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants