title: cannot implicitly convert type 'system.collections.generic.list<string> ' to 'system.collections.generic.list<entities.tablename>
body: <p>I tried almost all the solutions but of no use.I am unable to get the distinct list of the particular column Priority.Any help greatly appreciated.  </p>
  
  <pre><code>public List&lt;AlertType&gt; GetAllAlertNames()
          {
              var lstAlertNames = _zyenaDbContext.AlertTypes.Select(x =&gt; x.Priority).Distinct().ToList();
  
              return lstAlertNames;          
          }
  </code></pre>
  
  <p>The following error occurs with return lstAlertNames:</p>
  
  <pre><code>cannot implicitly convert type 'system.collections.generic.list string '
   to 'system.collections.generic.list zyenaEntities.AlertType
  </code></pre>
  
  <p>In Model AlertType</p>
  
  <pre><code>public string Priority { get; set; }
  </code></pre>