Mark BusinessBase object IsNew=false #3364
Answered
by
rockfordlhotka
CROprogrammer
asked this question in
Questions
-
Is there any way to mark BusinessBase object's |
Beta Was this translation helpful? Give feedback.
Answered by
rockfordlhotka
Jun 5, 2023
Replies: 1 comment 2 replies
-
MarkOld? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The rule is probably being executed when the postback data is bound to the properties as the
Project
object is being created so it can be passed into theEdit
method - so before any of the code in theEdit
method is executed.This occurs in
Csla.Web.Mvc.Shared.CslaModelBinder
:csla/Source/Csla.Web.Mvc.Shared/CslaModelBinder.cs
Line 59 in 91921c0
I don't see a way to prevent this behavior without altering
CslaModelBinder
- probably to globally disable the automatic running of rules, which would require that your code in the controller callCheckRules
when and if you want the rules to run.