how do we know that a save operation was successful or not

how do we know that a save operation was successful or not

Old forum URL: forums.lhotka.net/forums/t/12334.aspx


simisreedharan posted on Monday, January 27, 2014

I am new to csla framework. In my aspx.cs page i am calling say category.save. This goes to the DataPortal_Insert and saves the record and the procedure returns a value which says whether the insert was successful or not. This value is not returned back to the aspx.cs page. So how could i return this value to the front so that i could check its value and say whether the save was succesful or not?

Thanks

Simi

JonnyBee replied on Monday, January 27, 2014

Hi,

Not sure what your problem is. 

The return value should be part of the business object and you must also remember that Save returns a new object. 

IE:

savedCategory = category.Save();
saveOK = savedCategory.ResultCode == 0;

 

 

simisreedharan replied on Monday, January 27, 2014

Thankyou. This is what i was looking for. I was wondering whether i could add ResultCode as a property of business object.

Thanks

simi

Copyright (c) Marimer LLC