title: asp.net 4.5 MVC SQL using distinct
body: <pre><code>@foreach (var item in Model) { string mytown = item.town.*enter distinct here* &lt;option value="@mytown"&gt; @mytown&lt;/option&gt; 
  </code></pre>
  
  <p>This selects all the town names in my database and I've got it to display in a drop down menu.</p>
  
  <p>How can I change this so that when it's displaying the town names, it will only show each town name once.</p>
  
  <p>For example, if I have 3 londons in the database it will show all 3 londons in the drop down menu. I want it to only show 1 london</p>
  
  <p>FYI: Sorry this may seem like a repost but I posted the wrong code earlier </p>