WCF Remoting SelfService -> IEntity

Posts   
 
    
ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 26-Sep-2007 14:46:33   

I have created a simple WCF Server/Client HelloWorld app based on the example in the help files using version 2.5, Sept 24th.

I converted the mode to SelfServicing from Adapter and return an IEntityCollection object.

WCF runs well and I can stop the code as it requests an IEntityCollection , gets it correctly with many items, then sends it back. So the plumbing is ok.

However in the Service when returned, the IEntityCollection object always has a 0 Count.

Before I rip too far into the code, my question is: Does IEntityCollection (SelfServicing ) work over WCF Remoting?

The Help documentation only has examples for Adapter, so i am guessing not?

Thanks, Ian

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Sep-2007 16:04:42   

I think it's mentioned somewhere else in the docs. In "Concepts -> Templates and Template groups"

When to use SelfServicing When the project targets a single database type. When you are not using a distributed scenario like remoting or webservices. When you need navigation through your object model in a databinding scenario and you want to load the data using lazy loading. When you don't need to extend the framework. When you like to have the persistence logic into the entity classes. When you do not require fine grained database access control, like targeting per call another database.

When to use Adapter When the project targets multiple database types or would be able to do that in the future. When you are using a distributed scenario like remoting or webservices. When you don't need lazy loading scenarios in relation traversals. You can still navigate relations but you have to fetch the data up-front. When you need to extend the framework with derived classes. When you like to see persistence logic as a 'service', which is offered by an external object (broker, adapter). When you require fine grained database access control. When you want to convert Entities to XML and back and performance and XML size are important.