Parent Property Question
Old forum URL: forums.lhotka.net/forums/t/5966.aspx
Ash002 posted on Tuesday, December 09, 2008
A BusinessBase descendant has its Parent property set when assigned to BusinessListBase. When a BusinessBase descendant stores in as a property another child BusinessBase, is there any need to set the this child object's parent property? Is it a stupid question?
Eg
class Person : BusinessBase<Person>
{
...
public Address Address
{
get {return GetProperty<Address>(AddressProperty);}
set {SetProperty<Address>(AddressProperty, value);}
}
}
class Address : BusinessBase<Address>
{
}
Thanks
Ashley
daniel_higgins replied on Tuesday, December 09, 2008
I typically do not set the Parent property of a child BusinessBase<T> when used as a direct descendent (no intermediate BusinessListBase collection) of a parent BusinessBase<T>.Ash002 replied on Thursday, December 11, 2008
Thanks, answering my own question, csla sets the parent property for you.
Copyright (c) Marimer LLC