0
我有一個類(vb.net),我想在LinqPad中查詢一些數據。我已經和一些來自「Linq in Action」的例子一起工作,所以他們使用某種類型的數據來解釋查詢。但我無法找到關於如何導入或編寫自己的類的任何內容。有人可以幫我嗎?在LinqPad中創建自己的數據示例
我的班級是這樣的:
Public Class Employee
Public Property ID As Integer
Public Property Salery As Integer
Public Property Name As String
Public Property Department As String
Public Property Gender As String
Public Shared Function GetAllEmployees() As List(Of Employee)
Return New List(Of Employee) From { _
New Employee With {.ID = 1, .Name = "Mark", .Department = "HR", .Gender = "Male", .Salery = 12000},
New Employee With {.ID = 2, .Name = "Sandra", .Department = "IT", .Gender = "Female", .Salery = 2000} _
}
End Function
End Class
我明白了!太好了,非常感謝! – ruedi 2014-09-07 09:27:30