David Hayden [MVP C#]

Sponsors

The Lounge

Wicked Cool Jobs

News

  • CodeBetter.Com Home

Other Links

Teas

Patterns & Practices

Florida .NET Developer

Book Reviews

Tampa ASP.NET MVC Developer Group

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
EntLib 4.0 Validation Application Block and Unity Screencast

In my last screencast I talked about integrating the Data Access Application Block with Unity:

In the following screencast on the Validation Application Block in Enterprise Library 4.0:

we don't need to discuss Unity Extensions like in the previous screencast, because we can get really nice injection of validator classes, such as IValidator<Customer>, into our custom classes by creating a simple wrapper around the Validation Application Block and registering the wrapper with Unity.

The screencast shows how to create a simple wrapper around the Validation Application Block, register it with Unity.RegisterType, access the custom validator classes via Unity.Resolve, and have Unity inject those validator classes into custom classes, such as an AddCustomerPresenter Class. The same techniques will work if you are using the ASP.NET MVC Framework and injecting validator classes into a Controller.

For more information on the Validation Application Block:

You can also check out my Unity Dependency Injection Screencasts:

 

Thanks for all the positive feedback on the previous screencast :) Enjoy!

David Hayden


Posted Mon, May 26 2008 11:05 PM by David Hayden

[Advertisement]

Devlicio.us