映射类型:
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
答案 0 :(得分:0)
可查询
(http://llblgen.com/documentation/3.5/LLBLGen%20Pro%20RTF/hh_goto.htm#Using%20the%20generated%20code/Linq/gencode_linq_gettingstarted.htm#LinqMetaData)
这是一个查询,它将使编译器生成代码,该代码在运行时创建一个表达式实例树,表示整个查询,简称表达式树。表达式树不能直接执行,必须将其解释为执行Expression树中指定的内容。这就是Linq提供者,如Linq to LLBLGen Pro,它:它接受一个表达式树,将其转换为它可以理解的元素,解释这些元素并生成此查询的可执行形式。
ILLBLGenProQuery(http://llblgen.com/documentation/3.5/LLBLGen%20Pro%20RTF/hh_goto.htm#Using%20the%20generated%20code/Linq/gencode_linq_gettingstarted.htm#ILLBLGenProQuery)
LinqMetaData生成的IQueryable元素上定义的接口。此接口允许您通过调用Execute方法来执行查询。这样做的好处是您可以在其本机容器中获取查询结果,例如实体集合。另一个优点是,要获得结果列表,提供程序不必完整遍历结果,并将结果复制到List中:返回的结果已经存储在它们最初存储的容器中。 / p>