WCF Data Services (oData): Dependency Injection with DataService?

This is not as "clean" as integrating your IoC container deep into the WCF factory classes but if you want to supply a DataSource you could use the Common Service Locator (link at bottom) with your existing IoC container and override the CreateDataSource method of DataService protected override MyEntityContext CreateDataSource() { return ServiceLocator.Current.GetInstance(); } Common Service Locator library commonservicelocator.codeplex.com.

I have several services I want to pass into it. The "host" application or project for the DataService is based on ASP.NET MVC 2.0. My IoC container is setup in the MvcApplication.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions