title: How to define List with data from model and then use with lambda expression to get all elements
body: <p>What i trying to do is to fill list with names with data from model and set to View and show in view With dropDownListFor ...is my logic a right ...and what i should do else</p>
  
  <p>Model :</p>
  
  <pre><code>public class Categories{
  public int id {get;set}
  public string categoryName{get;set}
      public List&lt;CategoryName&gt; catNames {get;set;} //or IEnumerable&lt;&gt;
  }
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>public ActionResult getSomething(){
  public List&lt;CategoryName&gt;   list = new List&lt;CategoryName&gt;() ;
  public List&lt;CategoryName&gt; names= list.FindAll(x=&gt;x.categoryName);
  return View(names)
  }
  </code></pre>