title: Client Side validation in MVC 3 Database First
body: <p>If I add <code>[Required]</code> in my entity class then unobtrusive validation works fine.</p>
  
  <p><code>[Required]</code> is not added where I generate my entity class using database first(*.edmx).</p>
  
  <p>If I manually add [Required] in my entity property, something like</p>
  
  <pre><code>[Required]
  public int {get;set;}
  </code></pre>
  
  <p><code>[Required]</code> will delete when I update my edmx.</p>
  
  <p>So my question is how can I perform client side validation if I use database first in EF.</p>