title: Forcing Id and UserName to be unique in ASP.NET MVC 3 Model
body: <p>In my ASP.NET web site users model, I want both Guid <code>Id</code>'s and String <code>UserName</code>s to be unique. I am going to map my model objects to a DB using Entity Framework.</p>
  
  <p>Is there a build-in attribute or some other mechanism that facilitates this common constraint in ASP.NET MVC? Or am I bound to manually checking user name uniqueness at user register form?  </p>