WCF usage on client side

Posts   
 
    
LukeO
User
Posts: 58
Joined: 23-Jul-2007
# Posted on: 20-May-2008 00:14:34   

I'm using Adapter with LLBLGen v2.5.

Playing around with WCF as more of a test right now and I got things to communicate and all is fine. No bugs - just testing things.

Now for some larger questions to see if WCF is a correct way to do what I want to do.

I'm developing the back-end and would like to give my UI developers Intellisense on objects I create in the back-end. Right now I can transmit IEntity2 and IEntityCollection2 but I don't want the front-end developer to have to re-iterate over the fields collection of those objects. Do I need to hand the main back-end DLL as a reference to the end-developer for a cast? I was trying to avoid doing that. I just wanted interfaces. Can I just use my

Using the example from the help file: // C# ChannelFactory<IWCFExample> channelFactory = new ChannelFactory<IWCFExample>("WCFExampleServer"); IWCFExample server = channelFactory.CreateChannel();

// Fetch an entity IEntity2 c = server.GetCustomer("CHOPS");

// Fetch a collection IEntityCollection2 customers = serverTest.GetCustomers();

What if my customer entity has a property (I'm using lots of partial classes) called "CreditLimit". How would I have c.CreditLimit in the example above?

Sorry if this seems like a totally stupid question.

Thanks, -Luke

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 21-May-2008 10:52:34   

If you are going to return Entity and EntityCollection objects, then you should distribute the Generated Database-Generic (from Adapter model) assembly, along with the ORMSupportClasses...dll.

Otherwise you'd better use DTOs instead.

LukeO
User
Posts: 58
Joined: 23-Jul-2007
# Posted on: 21-May-2008 20:39:25   

Walaa wrote:

If you are going to return Entity and EntityCollection objects, then you should distribute the Generated Database-Generic (from Adapter model) assembly, along with the ORMSupportClasses...dll.

Otherwise you'd better use DTOs instead.

Thanks. I was trying to avoid that since I also have auditor and authorizer dlls (via injection) that I want to keep on the server. Looks like DTOs. Now... to see if LLBLGen has some initial templates for this.

Thanks again.

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 23-May-2008 15:16:28   

Search the forum for "DTO" you will find some 3rd party templates.