title: How to add FirstOrDefault value into cshtml dropdownlist
body: <p>How to add FirstOrDefault value into cshtml dropdownlist?</p>
  
  <p><strong>Controller:</strong> Gets First Customer that has CustomerActive == false</p>
  
  <pre><code>   CUSTOMERLIST singleCustomer = db.CUSTOMERLIST.FirstOrDefault(s =&gt; s.CustomerActive == false);
              ViewBag.SingleCustomer= singleCustomer;
  </code></pre>
  
  <p><strong>CSHTML:</strong></p>
  
  <pre><code>@Html.DropDownList("SingleCustomer", String.Empty)
  </code></pre>