CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

MarkAsChild and ReadOnlyBase child objects.

rated by 0 users
Answered (Verified) This post has 1 verified answer | 1 Reply | 1 Follower

Top 50 Contributor
159 Posts
tarekahf posted on Tue, Apr 24 2012 7:58 AM

I wanted to create a Child ReadOnlyBase, and I was checking template (.NET 2.0), "ReadOnlyChild.vb" and I did not find "MarkAsChild()".

Does this mean that for Readonly Child Object, there is no need to mark the object as child?

What is the purpose of marking child objects as "child"?

Tarek.

Answered (Verified) Verified Answer

Top 10 Contributor
1,764 Posts
Verified by tarekahf

MarkAsChild is only valid for EditableObjects and will make the object block Save() method.

IE: If you call Save on an object that is MarkedAsChiild it will throw exception.
     Child editable lists will only accept objects that are marked with MarkAsChild.

Jonny Bekkum, Norway CslaContrib Coordinator

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems