You can assign the LINQ result to a variable and check if .Count ()> 0. This way you won’t have to do the same query twice.
code:
'check for empty return
Dim r = (From s In myEntity.employee Where employeeID = myEmployeeIDVariable)
'If there is a record, then process
If r.Count() > 0 Then
. . . do stuff . . .
End If
source
share