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