Managed read-only properties

Managed read-only properties

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


dx05 posted on Thursday, March 11, 2010

Hi, can anyone tell me, how to to set the properties of a ReadOnlyBase child when using managed readonly properties without private backing fields? Since there is no field and no setter: how to initialize the child objects data  from the parents dataportal? (CSLA 3.6.3)

Thanks for any hint or example!

- Harald

skagen00 replied on Thursday, March 11, 2010

When populating the object,  you can use LoadProperty - i.e. LoadProperty(FirstNameProperty, "chris")

Is that what you're asking?

If you're talking about populating a child from the parent's fetching of the data, you can

LoadProperty(ChildObjectProperty, ChildObjectClass.GetChildObject(safeDataReader));

 

Fintanv replied on Thursday, March 11, 2010

Chapter 7, Page 244 onwards.  LoadProperty

Copyright (c) Marimer LLC