我已经按照here的说明添加了一个引用(NuGet程序包),但是LINQPad无法识别它。
这是我的查询:
Sub Main
Dim iImportList As New List(Of Integer)
Dim oSearch As New List(Of Match)
For i = 1 To 226
iImportList.Add(i)
Next
Using oDb As Db.Context = Db.Context.Create
oSearch.Add(From A In oDb.Applicants
Join C In oDb.Customers On
A.FirstName Equals C.FirstName And
A.LastName Equals C.LastName And
A.Ssn Equals C.Ssn And
A.Dob Equals C.Dob
Where
C.TotalBalance > 0 AndAlso
A.Aln.StartsWith(DateTime.Now.Year) AndAlso
iImportList.Contains(C.ImportId)
Select
New Match With {
.ApplicantId = A.ApplicantId,
.CustomerId = C.CustomerId,
.MatchLevel = Db.Match.MatchLevels.FirstLastSsnDob
})
End Using
End Sub
Class Match
Public Property ApplicantId As Integer
Public Property CustomerId As Integer
Public Property MatchLevel As Db.Match.MatchLevels
End Class
...结果如下:
我们可以看到,LINQPad忽略了我的SQLCE参考,而是使用了SQL参考。 (System.Data
引用显然是LINQPad内部的;我没有添加它。)
如何让LINQPad做相反的事情-忽略SQL参考并按预期使用SQLCE参考?