title: RavenDB querying with object that doesn't have Id property
body: <p>I am using an class to store data in RavenDb but I cannot change the structure of the class to include the <strong>"Id"</strong> property.  I'd like to use the Id property to retrieve a document later.  How can I do this?</p>
  
  <p>I have tried using a base class as follows:</p>
  
  <pre><code>class Customer : CustomerRecord
  {
     public string Name { get; set; }
     public string Address { get; set; }
     public string City { get; set; }
     public string State { get; set; }
     public string Zip { get; set; }
  }
  </code></pre>
  
  <p>where CustomerRecord would contain the <strong>"Id"</strong> property like this:</p>
  
  <pre><code>class CustomerRecord
  {
     public int Id { get; set; }
  }
  </code></pre>
  
  <p>Then we want to be able to run something like the code below that queries the <strong>"Customer"</strong> documents but returns a <strong>"CustomerRecord"</strong> format including the Id:</p>
  
  <pre><code>using (var session = _docStore.OpenSession())
  {
     var customer = session.Query&lt;Customer&gt;()
              .ToList&lt;CustomerRecord&gt;();
  }
  </code></pre>
  
  <p>The code above doesn't work because a linq query needs to have the Query type and the ToList type be the same.  Can anyone help with a solution to returning the base class?  </p>
  
  <p>I am very new to RavenDB so forgive me if this is an obvious question.</p>
  
  <p>Thanks,
  Brian</p>