I am trying to do the following using MVC3, LLBLGEN PRO and it's throwing me the following error:
Mapping types:
LLBLGenProQuery1 -> LLBLGenProQuery
1
SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery1[[Mail.DAL.EntityClasses.TblCostCentreEntity, Mail.DAL, Version=1.0.4638.16064, Culture=neutral, PublicKeyToken=null]] -> SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery
1[[Mail.Model.CostCentre, Mail.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Destination path: LLBLGenProQuery`1
Source value: SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery`1[Mail.DAL.EntityClasses.TblCostCentreEntity]
Public Function GetAllCostCentres() As SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery(Of Model.CostCentre) Implements ICostCentreRepository.GetAllCostCentres
Dim metaData As New LinqMetaData
Dim q = From p In metaData.TblCostCentre _
Select p
Mapper.CreateMap(Of SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery(Of CostCentre), EntityClasses.TblCostCentreEntity)()
Mapper.Map(Of SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery(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 q
End Function