CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

DoSave Method not work

rated by 0 users
Answered (Verified) This post has 1 verified answer | 3 Replies | 1 Follower

Top 75 Contributor
114 Posts
Stefanus posted on Mon, Aug 6 2012 12:04 PM

Hi rocky..

I got a strange problem

i have to different view model

which are one DoSave method work BUT another DoSave not work and it's not display an error, i tried to debug but can't found any error BUT MY Business Object is not SAVED.

I tried to break on DataPortal_Insert , BUT it's never reach ?

 

Do you have any suggesstion or something I'm missing ?

 

Thanks a lot

 

Stefanus

Answered (Verified) Verified Answer

Top 10 Contributor
1,770 Posts
Verified by Stefanus

Basically - this means that a DAL object is part of the Object Graph of PaymentEditBO and thus is supposed to be serialized.

If you need this as a property then remember to keep it as a private backing field marked with [NotUndoable] and [NonSerialized] attributes.

Jonny Bekkum, Norway CslaContrib Coordinator

All Replies

Top 10 Contributor
9,270 Posts

Are you overriding the OnError method in your viewmodel? That is where you'd see the error from the DoSave method.

Rocky

Top 75 Contributor
114 Posts

Hi rocky ,

 

thanks a lot :)

yes, i forgot to catch the error, NOW the BO can be saved.

But in this case, i have something that i understand,

First, My First Error is : I forgot to mark Serializable on said it PaymentEdit BO, after i mark it it can be saved, i have check it on DB

BUT

The second problem arise : it still display an error that said MyDal have to be mark as Serializable too ( I don't know why this happen )

as long as I know Dal is run on server side, not travel from client to server or vice versa, Am I right ?

 

Am I missing something ? because my another BO is no ask about mark serializable on their DAL ??

 

thanks a lot

 

Stefanus

 

Top 10 Contributor
1,770 Posts
Verified by Stefanus

Basically - this means that a DAL object is part of the Object Graph of PaymentEditBO and thus is supposed to be serialized.

If you need this as a property then remember to keep it as a private backing field marked with [NotUndoable] and [NonSerialized] attributes.

Jonny Bekkum, Norway CslaContrib Coordinator

Page 1 of 1 (4 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems