Sample app demoing DI, transactional proxies & ASP.NET MVC 2?

Topics: Data Access Application Block, Enterprise Library Core, General discussion, Logging Application Block, Policy Injection Application Block, Validation Application Block
Nov 24, 2010 at 2:23 PM

Hi all,

I'm trying to compare Enterprise Library 5 & Unity 2 to other frameworks (especially Spring.NET & Windsor), and need a sample application that demonstrates the best practices of

  • dependency injection,
  • data access application block, especially transactional proxies (via policy injection application block?), and
  • ASP.NET MVC 2

The basic architecture I'm looking for in the middle tier is your typical business service layer that gets injected with a repository, and the repository gets injected with a database.  The database configuration needs to be externalized (outside of source code).  The controllers should be injected with the business service.  The business service and repository have behaviors that are defined by interfaces so that they are testable, and all implementation classes are as close to PONOs (plain old .NET objects) as possible, meaning the only thing infrastructural that they might have in them are attributes for transaction control (like "[Transactional]" or similar on service method implementations), or dependency injection attributes, if necessary at all.

If it has good unit & integration testing coverage (NUnit or MSTest) in the form of a test project as part of the solution, that would be great.

Where can I find such a thing?

Thanks,
Matthew

Nov 25, 2010 at 12:50 AM

I found some related articles and threads:

http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/unityinaspmvc07102009032406am/unityinaspmvc.aspx

http://blogs.microsoft.co.il/blogs/gilf/archive/2009/02/08/how-to-use-unity-container-in-asp-net-mvc-framework.aspx

http://forums.asp.net/p/1616643/4140233.aspx

I can't find an application with the specifics you mentioned.  But feel free to post Unity-related questions in the Unity discussion forum and here for EntLib-related questions when building your own application.

 

Sarah Urmeneta
Global Technologies & Solutions
Avanade, Inc.
entlib.support@avanade.com