In WCF, you can basically always do everything in either config (preferred way for most cases) or in code.
So you could definitely use the generated proxy interfaces and classes, and bake the endpoints etc. into code in your client project.
But again - using the config is usually the preferred way to go (more flexibility). But if you must - you can do (almost) everything using lines of code as well.
If you do want to use config, then you need to add the relevant sections to your client app's config file.
One way to "centralize" and share that information is by putting as much of it as possible into separate config files - e.g. you could have one config file for the behaviors and call it behaviors.config
, have another one with the client settings called clients.config
.
In your client's app, you can then reference those common, shared configs:
<system.serviceModel>
<behaviors configSource="behaviors.config" />
<client configSource="clients.config" />
</system.serviceModel>
You cannot get away without any config at all - but you could definitely centralize and share a good deal of that config stuff once and then reuse it multiple times.