Skip to content
Discussion options

You must be logged in to vote

What is happening here, is that the MVC data binding creates the RoleEdit instance and loads the properties of the object. That runs the rules as the properties are set.

When I say "MVC data binding", in reality this is handled by a CSLA-specific implementation in CslaModelBinder.

Looking at the implementation, I can see where it might be wise to rework this to call CheckRulesAsync instead of CheckRules and entirely abstract the issue into the binder. This change would probably address your issue without any special code in any individual controller.

My recommendation to you is to take a copy of CslaModelBinder, switch the CheckRules call, and configure aspnetcore to use this binder inste…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@rockfordlhotka
Comment options

@CROprogrammer
Comment options

@rockfordlhotka
Comment options

Answer selected by CROprogrammer
@rockfordlhotka
Comment options

@richardbartley
Comment options

Comment options

You must be logged in to vote
2 replies
@rockfordlhotka
Comment options

@CROprogrammer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants