title: Help! Checking if a field is empty
body: <p>I'm using Linq-to-SQL as my ORM on a ASP.Net MVC2 application. I have a table called Area which is related to the Jefe table.</p>
  
  <p>In my application, I don't want users to write down a value in the IDJefe field, but rather select from a combobox.</p>
  
  <p>Should I ask if string.NullorEmpty for (IDJefe) or (Jefe)? Both of these properties are available to me, but this is my first adventure into building a full application with Linq-to-SQL.</p>
  
  <p>I was thinking of using IDJefe as the value to check, because a comboBox can have a selectedIndex, right?</p>
  
  <p>Thank you.</p>
  
  <pre><code>public IEnumerable&lt;RuleViolation&gt; GetRuleViolations()
      {
          if (String.IsNullOrEmpty(Nombre))
              yield return new RuleViolation("Nombre requerido", "Nombre");
  
          if (IDJefe == null)
              yield return new RuleViolation("Jefe requerido", "IDJefe");
  
          yield break;
      }
  </code></pre>