title: Add model validation to LINQ objects mvc
body: <p>Hi am using Linq to SQL to create objects from my database i.e. Customer.  I then have a model which is like this:</p>
  
  <pre><code>public class EventModel{
  
     public Customer Customer {get;set;}
  
     public Event Event {get;set;}
  
  }
  </code></pre>
  
  <p>I then have a view which lists the Customer and Event details which can be edited.  My question is how do we add validation on the Customer?  <code>The Customer.Name</code> field is a required field but I cannot define this.  Is there any logic that can be used for the system to understand this is a non nullable field from the database?</p>
  
  <p>Thanks in advance</p>