title: How To Convert 'system.collections.generic.list ' to 'system.data.datatable'
body: <p>Here i am trying to bind the user list <code>uow.Repository&lt;User&gt;().GetAll().ToList();</code> to <code>DataTable dt</code> but there is a error saying cannot convert type 'system.collections.generic.list ' to 'system.data.datatable' in line <code>dt = uow.Repository&lt;User&gt;().GetAll().ToList();</code>.<br><br>
  Below is my code<br><br></p>
  
  <pre><code> public DataTable GetAllUser1()
      {
          DataTable dt = new DataTable();
          dt = uow.Repository&lt;User&gt;().GetAll().ToList();
          return dt;
      }
  </code></pre>
  
  <p><br>Any Help will be highy appreciated.Thank you</p>