Monthly Archives: July 2013

Simple MVC Application using FluentValidation.MVC4

This is a simple example of MVC application using FluentValidation.MVC4. Create a new web application MVC4. Get the fluent validation using nuget: Create a validation rule set class: Now add the attribute to the model class: FluentDataModel Add the Provider to the Global.asax file App_Start() method And the validation works (Note: the dependency validation […]

Simple MVC Application using standard Validation (DataAnnotations)

This is a simple example of standard MVC validation provided in the .NET framework. Create a new MVC application. Edit the index.cshtml file. Important: for client validation to work, the scripts section must be included. (Defined per default in the _Layout View and the BundleConfig.cs in the App_Start folder) Create a Model Edit the web.config […]

Simple MVC Application using Enterprise Library Validation

This is an example of a simple MVC application using Enterprise Library validation First add the EL validation to your project using nuget: Now the Enterprise Library Validation has to be added to the ModelValidatorProviders Create a EnterpriseLibraryValidatorWrapper class And now create a EnterpriseLibraryValidatorProvider Now add it to the Application_Start() method in the global.asax The […]

Enterprise Library 6, Unity 3, MVC, Validation with Interception ValidationCallHandler Part 5

This post continues on from the previous post. Part 4 Enterprise Library 6, Unity 3 InterfaceInterceptor with MVC 4 In this post a validation call handler will be added using unity 3 with VirtualMethodInterceptor and enteprise library Policy Injection. Enterprise library 6 has the following call handlers (Out of the box): AuthorizationCallHandler ExceptionCallHandler LogCallHandler PerformanceCounterCallHandler […]