WCF in-code configuration more tightly coupled?

  • Thread starter Thread starter suedeuno
  • Start date Start date
S

suedeuno

Seems to me that using in-code configuration to create the client
service requires the client to be coupled to the model (or wherever
the service contracts are located). Looks like this configuration
method isn't the best choice if you've got multiple consumer clients.
Seems to me that using 'Add Service Reference' is still preferred for
this scenario, no?
 
You can have multiple IService.cs(s), Service.svc(s) and
Service.svc.cs(s) in one WCF service in a Service Reference. It would be
implemented in the wcfservice.config as multiple endpoints.

Right, but my point was if I'm configuring my proxy in the code of the
client (using ChannelFactory<IServiceContract>) that means that I need
to reference whatever assembly the service contracts resides in and
any time that assembly gets updated I have to update my assembly
reference in the client(s). All of the sudden the client, instead of a
service reference, now has a assembly reference to the service
classes. May as well cut out the wcf service all together and just
reference assemblies it would seem at that point.
 
Back
Top