title: EntityDataReader to ToList()
body: <p>my code :</p>
  
  <pre><code>public List&lt;Book&gt; GetBook(string Field, object Value)
  {
      using (EntityConnection conn = new EntityConnection("name=Entities"))
      {
          conn.Open();
  
          // Create an EntityCommand.
          using (EntityCommand cmd = conn.CreateCommand())
          {
              cmd.CommandText = "Select VALUE b FROM Entities.Book as b where  Cast(b." + Field + " as  Edm.String) like '%" + Value.ToString() + "%'";
              // Execute the command.
              using (EntityDataReader rdr =
                  cmd.ExecuteReader(CommandBehavior.SequentialAccess))
              {
                  conn.Close();
                  var s = from d in rdr.OfType&lt;Book&gt;().AsEnumerable()
                          select d;
                  return (s.ToList());
              }
          }
      }
      return (null);
  }
  </code></pre>
  
  <p>why The result is always empty???</p>
  
  <p>What is the correct code?</p>