Not sure if this is correct, but your signatures do not
match. .UpdateChild call takes two paramenters, Update_Child only takes
one…
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Magenic ®
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Wednesday, July 16, 2008 9:43 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Managed child BO property - DataPortal update
failing
Hi,
I have a managed property, which is a child BO instance. I register it
like this in the parent object:
private static readonly PropertyInfo<DepartmentPhoneNumber>
PhoneNumberProperty =
RegisterProperty<DepartmentPhoneNumber>( new
PropertyInfo<DepartmentPhoneNumber>(
"PhoneNumber" ) );
In the parent's DataPortal_Insert, I try to update the child via this call:
DataPortal.UpdateChild( PhoneNumberProperty,
dept );
In the child BO, I have the method:
private void
Child_Update( Data.Contacts.Department dept )
{
Data.Shared.Phone result;
result = PhoneData.Update( this );
if ( ReadProperty( TypeProperty ) == "Office" ) {
dept.Phone = result;
}
else {
dept.Fax = result;
}
}
The problem is that on the DataPortal.UpdateChild call it complains that
Child_Update is not implemented. Any ideas?
Thanks
Andy
Copyright (c) Marimer LLC