0

I have 2 solutions, solution A and solution B.

Solution A has business rules, and shouldn't know about external tecnology, no db, no wcf, etc...

Solution B in the other hand have few business rules that are shared across the company and are exposed through wcf services.

My intent is to consume the contracts defined in Solution B by classes in Solution A, that way Solution A doesn't know about WCF. But I don't know how to bind this, so far I tried creating a new project in Solution A that holds a reference to both the contract and the wcf service in Solution B, then using some sort of IOC container I'd bind them, but its getting pretty messy. Is there a better solution to this?

Edit: The service is hosted on IIS.

BrenoSarkis
  • 305
  • 2
  • 13
  • How does Solution A know about the Interface in Solution B? Did you add the WCF service as a service reference, or am I missing the goal here? – Van Jan 06 '15 at 12:18
  • The interface and the service are in different dlls. So I referenced the interface dll from solution A. The way I tried to solve it was to create a different project in solution A that held a reference to both projects in solution B and then using some sort of IOC Container it'd bind the contract to the service, is that clear? – BrenoSarkis Jan 06 '15 at 12:22
  • Create a project were the logic of the interface is then modify the WCF to call this project when a method is invoked from a client and do the same in Solution A. Then both use the same code base but Solution A does not knwo anything about WCF. But this would not necessarily work if Solution A is deployed to other computers – Van Jan 06 '15 at 12:47

0 Answers0