Replacing Child BO while editing

Replacing Child BO while editing

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


Ash002 posted on Thursday, December 11, 2008

This may seem an odd question but:

When a root BO has a child editable BO as a property, and editing has begun on the root BO, is it possible to replace the child BO with another BO - the replacement being of the same type but with different property values?

We have attempted this and it (predicatably) produced an edit level error. However is there an acceptable way to correct the edit level and replace the object?

Thankyou

Ashley

RockfordLhotka replied on Thursday, December 11, 2008

If you are using CSLA .NET 3.6 (and probably 3.5), and your child object reference is maintained using a managed backing field (the new property syntax), then you should be able to set the value using LoadProperty() and have the edit level automatically managed for you.

Copyright (c) Marimer LLC