Vibrant discussion about CSLA .NET and using the framework to build great business applications.
does anybody know a way to implement an abstract child-object factory using DataPortal.FetchChild(of T) to get different types of child-objects depending on parent object state using Csla 4.1. and the encapsulated invocation model?
I have a root object which does have a managed "data" property (of data type object), which can be assigned to different child object types, depending on the situation (can be a child list, or a child). When retreiving the parent object, the decision will be made, of what type the data property will actually be and the Child-Factory is responsible to get the appropriate child object.
I tried to use an abstract function to return a child-object of T, but the child dataportal throws an exception, that abstract types cannot be fetched. Is it possible at all? I'm using the encapsulated invocation to retreive data, according to "Using Csla4 - Data Access" ebook.
Thanks for your help.
The data portal isn't designed to do this in the encapsulated invoke model. In other words, you can't directly use FetchChild to do this.
There are some alternatives.
Thank you very much for the quick reply, that does help me very much.