title: Is there a way to restrict value of a column in Entity Framework?
body: <p>I want to restrict values of a property of an entity in Entity Framework.</p>
  
  <p>For example:</p>
  
  <pre><code>public class Position: EntityBase
  {
      [AnAtribute("Values:1,2,3")]
      public int Status { get; set; }
      public string ReferenceCode { get; set; }
      public string Location { get; set; }
      public string Content { get; set; }
  }
  </code></pre>
  
  <p>Values can come from an enum also.</p>
  
  <p>In this table here, the <code>Status</code> column can have a value; 1, 2 or 3. Otherwise EF will throw exception.</p>
  
  <p>I can make a <code>Status</code> table and define all statuses of course. But I don't want to join with that table everytime. So it is not an option.</p>