【发布时间】:2011-04-28 16:40:50
【问题描述】:
关于 LINQ 的一个简单问题,我想使用返回数据集中的一个值来查找一个值并返回它。我正在努力解决的问题是 .ViewingNotes = New Viewing(pt.ProspectId).GetViewings().Columns(7).ToString()。这可能吗?
With BusinessLayerObjectManager.Context
Return (From p As [Property] In .PropertySet
Join pt As Prospect In .Prospects On pt.Property.propertyID Equals p.propertyID
Where (p.Development.DevelopmentID = devId)
Select New DevelopmentList With {
.Apartment = p.propertyApartment + " " + p.Development.Name,
.PropertyId = p.propertyID,
.Client = pt.Client.clientFirstname + " " + pt.Client.clientLastname,
.ClientId = pt.Client.ClientID,
.ProspectiveDate = pt.prospectiveDate,
.ProspectiveStatus = pt.prospectiveStatus,
.Agent = pt.Client.userID,
.ViewingNotes = New Viewing(pt.ProspectId).GetViewings().Columns(7).ToString(),
.PropertyStatus = ""
}).ToList()
End With
提前致谢。
【问题讨论】:
-
有错误吗?
Viewing类是什么?