4
我有一個Customer對象,其中包含ContactNumbers的集合。 LINQ有可能獲得其中一個聯繫號碼='123'的客戶列表嗎?LINQ集合中的聲明
Public Class Customer
Public Overridable Property ContactNumbers As List(Of ContactNumber)
End Class
Public Class ContactNumber
<Required()>
Public Property ID As Integer
<Required()>
<StringLength(20)>
Public Property Number As String
Public Overridable Property Type As ContactNumberType
Public Property Primary As Boolean
End Class
Dim findnumber as String = '123'
Dim customers = db.customers.tolist
customers = customers.Where..... ?
該死的,我很近! 謝謝! – Tom 2012-03-28 15:31:25