I have a project in which I am experimenting with DI. I use Unity and everything looks good for regular builds and injections.
I am trying to continue dependency breaks with WCF services. The WCF service that I want to deploy is created at runtime without using DI, and I do not use proxies created using .NET.
MyService = new ChannelFactory<IMyService>("BasicHttpBinding_IMyService").CreateChannel();
The endpoint for the above is in the web.config file:
<endpoint address="http://localhost:35806/MyService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyService"
contract="Interfaces.IMyService" name="BasicHttpBinding_IMyService" />
I am trying to figure out how to map this WCF service to an interface via web.config so that I can use the constructor installation
In web.config, normal mapping occurs using "mapTo", where you must specify an interface alias and an alias for a previously defined class.
<type type="IMyService" mapTo="MyService">
<lifetime type="singleton"/>
</type>
- WCF , "MyService", "BasicHttpBinding_IMyService" .
, ?