我正在尝试使用 MVC3、LLBLGEN PRO 执行以下操作,它向我抛出了以下错误:
映射类型:LLBLGenProQuery 1 -> LLBLGenProQuery
1 SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery 1[[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]]
目标路径:LLBLGenProQuery`1
源值: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