c# - Passing an instantiated class to concrete class derived by Castle Windsor -


I have a system that I am using to test some new architecture. I have the following setup (in MVC2 .NET - C intense):

see & lt; Controller & lt; Service & lt; Repository & lt; DB

I am using Castle Windsor as my D (IOC) controller, and it is working fine in both service and repo layer. However, now I am at a point where I want to pass the contractor of the service to an Entity Framework (Databamentyte), and then send it to the repo, so that I have something similar to the work unit of each request. It seems that I'm trying to achieve anyway) - and how can I use Castle Windsor? It is having trouble doing this work.

Am I going on a silly tangent? Any indication appreciated.

How do you want to pass it? From the call site? Use the Type Factory facility for this.


Comments