Using IDataErrorInfo with Validation Application Block

The IDataErrorInfo interface is a core part of the .NET framework and both WPF and ASP.NET MVC use this interface for validation purposes. In this article I will show how to build an abstract base class that implements IDataErrorInfo in a way that Validation Application Block is used under the covers.

read more...

- filed under .NET General, C#, Enterprise Library, Validation Application Block - five comments / No trackbacks - §

Mixing Validation Application Block With DataAnnotation: What About SelfValidation?

This article describes how to move the self validation methods of a type to its meta data type, using Validation Application Block 5.0. Using self validation methods inside Data Annotations' meta data type is something that is not supported out of the box.

read more...

- filed under .NET General, C#, Enterprise Library, Validation Application Block - nine comments / No trackbacks - §

Integrating Validation Application Block with ASP.NET part 2

This post describes how to take integration of Validation Application Block with ASP.NET Web Forms to the next level by introducing extension methods that centralize the creation of PropertyProxyValidator controls and enable compile time support. This post build on the code in the previous article and allows users to define value conversions.

read more...

- filed under ASP.NET, C#, Enterprise Library, Validation Application Block - five comments / No trackbacks - §

Integrating Validation Application Block with ASP.NET part 1

This post describes how to take integration of Validation Application Block with ASP.NET Web Forms to the next level by introducing extension methods that centralize the creation of PropertyProxyValidator controls and enable compile time support.

read more...

- filed under ASP.NET, C#, Enterprise Library, Validation Application Block - four comments / No trackbacks - §

Validator inheritance while using Validation Application Block configuration files

This article describes how to build an IConfigurationSource implementation that allows validators, defined in a base class or interface, to be inherited by subclasses and implementations.

read more...

- filed under .NET General, C#, Enterprise Library, Validation Application Block - three comments / No trackbacks - §

Splitting up Validation Application Block configuration into multiple files

This article describes how to build an IConfigurationSource implementation that allows reading multiple configuration files that each contain part of the total Enterprise Library Validation Application Block configuration.

read more...

- filed under .NET General, C#, Enterprise Library, Validation Application Block - three comments / No trackbacks - §

Putting the Validation Application Block configuration in its own file

This article describes how to extract the validation configuration to its own file and allow this to also work with unit tests.

read more...

- filed under Enterprise Library, Validation Application Block - five comments / No trackbacks - §

Integrating Enterprise Library Validation Application Block With LINQ to SQL and Entity Framework Part 4: Using Metadata to Automate Validations

This article describes how to extract information from your generated LINQ to SQL entities to automate validations like maximum string length and disallowing null values.

read more...

- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ, LINQ to SQL, O/RM, Validation Application Block - No comments / No trackbacks - §

Integrating Enterprise Library Validation Application Block with LINQ to SQL and Entity Framework Part 3: The complexity of custom validators.

This article shows the complexity a developer is facing, implementing a custom validator while using an O/RM tool. While the article uses the Validation Application Block and LINQ to SQL in writing the validation logic, the problems encountered in the article are very general.

read more...

- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ to SQL, O/RM, SQL, Validation Application Block - No comments / No trackbacks - §

Integrating Enterprise Library Validation Application Block with LINQ to SQL and Entity Framework Part 2: Using context within custom validators.

This article describes how to write custom validators for the Enterprise Library Validation Application Block, in such a way that it runs within the context of a specific LINQ to SQL DataContext or Entity Framework ObjectContext class, which allows analysis of non-persisted (in-memory) changes in that context.

read more...

- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ, LINQ to SQL, O/RM, Validation Application Block - two comments / No trackbacks - §

Integrating Enterprise Library Validation Application Block With LINQ to SQL and Entity Framework Part 1: Basic Integration

This article describes how to integrate the Enterprise Library Validation Application Block in conjunction with an O/RM technology such as LINQ to SQL and Entity Framework.

read more...

- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ, LINQ to SQL, O/RM, Validation Application Block - sixteen comments / No trackbacks - §