title: Unable to retrieve Distinct record from database?
body: <p>I have a Database table like below,</p>
  
  <pre><code>ID Author  Book
  
  1  Kate    Smuggler
  
  2  Harper  Smuggler
  
  3  Slater  Smuggler
  
  4  Kate   Katy
  
  5  Smitha  Katy
  </code></pre>
  
  <p>i want to retrieve all Book names(Distinct) based on the <strong>author name</strong> and display them on list view, i wrote the code below to Retrieve distinct values</p>
  
  <pre><code>int UserID = Convert.ToInt32(Session["User"]);
  
  var Li = (from s in Data.TableName where s.Author == UserID select s.Book).Distinct().OrderBy(ID=&gt;ID);
  
                      ListViewChatList.DataSourceID = "";
                      ListViewChatList.DataSource = Li;
                      ListViewChatList.DataBind();
  </code></pre>
  
  <p>but i get the following error 'System.String' does not contain a property with the name 'ID'.</p>
  
  <p>How to solve this ?</p>