Thursday, 5 September 2013

Unity 3 + N-Tier Architecture - How?

Unity 3 + N-Tier Architecture - How?

I am trying to understand Microsoft.practices.Unity.
So, I have this solution:
webproject
business classlibrary project as my logic tier
data classlibrary project as my data access tier
And I wanna use Unity to separate web tier from logic and separate logic
tier from data, using DI.
I have created an unity.config file in my web project, cause I wanna
control the registration from a configuration file, and not inside binary
code. This is ok for me. I am using Unity.MVC4.
But, with that, I only resolve my depedency injection only from web to
business tier. And how can I make the same thing for business to data tier
?
I have already seen some web examples but I am still confused, cause no
example shows me the process through the web tier to data tier, step by
step, to understand how to implement the Unity DI.
If someone may help me, I would like to see a simple example, with a
n-tier solution with total DI implementation with Unity.
Thanks, Marcelo.

No comments:

Post a Comment