(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

ValidationAttribute that validates a unique field against its fellow rows in the database

(3 votes)
0 comments   /   posted by Silverlight Show on Jan 23, 2012
Tags:   validation , entity-framework , shimmy-weitzhandler

Read original post by Shimmy Weitzhandler at Shimmy on .NET

Here is a ValidationAttribute subclass that will allow you validate that a column doesn't have duplicates.

It's intended to be used with EF 4.1 DbContext, or with the EF4's ObjectContext.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Our News on Twitter