title: Using Automapper to return IQueryable
body: <p>I am trying to return an IQueryable object in one of my functions and using mapping (Automapper). It manage to return an IEnumerable object fine but as soon as i try to return an IQueryable object it throws me an error:</p>
  
  <p>This is the error:</p>
  
  <p>Missing type map configuration or unsupported mapping.</p>
  
  <p>Mapping types:
  LLBLGenProQuery<code>1 -&gt; CostCentre
  SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery</code>1[[Mail.DAL.EntityClasses.TblCostCentreEntity, Mail.DAL, Version=1.0.4638.16064, Culture=neutral, PublicKeyToken=null]] -> Mail.Model.CostCentre</p>
  
  <p>Destination path:
  CostCentre</p>
  
  <p>Source value:
  SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery`1[Mail.DAL.EntityClasses.TblCostCentreEntity]</p>
  
  <p>This is the code:</p>
  
  <p>Dim metaData As New LinqMetaData
          Dim q = From p In metaData.TblCostCentre _
                      Select p
          Mapper.CreateMap(Of TblCostCentreEntity, CostCentre)()</p>
  
  <pre><code>    Dim t As IEnumerable(Of CostCentre) = Mapper.Map(Of CostCentre)(q)
      'Select New CostCentre With {.Active = p.Active, .CostCentre = p.CostCentre, .CreatedBy = p.CreatedBy, .DateCreated = p.DateCreated, .DateLastModified = p.DateLastModified, .ModifiedBy = p.ModifiedBy, .CostCentreID = p.CostCentreId}
  
      Return t
  </code></pre>