OnModelChanged not executed #4222
Replies: 2 comments 3 replies
-
Hi. That is intended behavior. Instead of re-assigning the model property.
The changes coming from the server are merged into the current instance of
the model. You can see that here:
https://github.com/MarimerLLC/csla/blob/fed03f30c2207d9991087a67defe6c9ce004568c/Source/Csla.Xaml.Shared/ViewModelBase.cs#L585
Hth
Grimbart ***@***.***> schrieb am So., 15. Sept. 2024, 14:15:
… Using .NET 8 / Csla 8.2.6 / Wpf, Xaml
In Csla 8.2.6 OnModelChanged is not executed when changing and saving my
BO.
Step 1: When initially fetching the BO it returns with IsDirty false (as
expected) and OnModelChanged in Csla.Xaml.ViewModelBase is executed. OK.
Step 2: When changing and saving the initially fetched BO, OnModelChanged
is NOT executed and the BO returns with IsDirty true (which should be
false). Although the changed state has been stored in the db.
Step 3: Also, when again changing the saved BO and canceling the changes,
the BO shows the initially fetched state from Step 1 (and not the saved
state from Step 2 as expected).
Csla 6.2.2 does not show this behavior, everything works as expected.
Maybe I missed a config in Csla 8.2.6?
Best regards
—
Reply to this email directly, view it on GitHub
<#4222>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJCZOJZXGN4VXIFFOGXGNLZWV27TAVCNFSM6AAAAABOHYNU26VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGE4DKNBVGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
weltesche
-
Thanks for the quick response. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using .NET 8 / Csla 8.2.6 / Wpf, Xaml
In Csla 8.2.6 OnModelChanged is not executed when changing and saving my BO.
Step 1: When initially fetching the BO it returns with IsDirty false (as expected) and OnModelChanged in Csla.Xaml.ViewModelBase is executed. OK.
Step 2: When changing and saving the initially fetched BO, OnModelChanged is NOT executed and the BO returns with IsDirty true (which should be false). Although the changed state has been stored in the db.
Step 3: Also, when again changing the saved BO and canceling the changes, the BO shows the initially fetched state from Step 1 (and not the saved state from Step 2 as expected).
Csla 6.2.2 does not show this behavior, everything works as expected.
Maybe I missed a config in Csla 8.2.6?
Best regards
Beta Was this translation helpful? Give feedback.
All reactions