I'm having trouble with this Linq query. I have a data table (including a Name column) with all the data I want to process. I want to do a Linq query to this data table, but I want to exclude names also found in myNegativeList where amount >= 15.
myNegativeList has (Name = "John"; Amount = 5) John should not be excluded from the Linq Query. myNegativeList also has (Name = "Sally"; Amount = 100) Sally should be excluded from the Linq Query.
Class ListItems
Public Name As String
Public Amount As Decimal
End Class
Sub GetList()
'get data table
Dim NoticeTable As DataTable = GetTable 'has Name and other data
'get my list of names I don't want
Dim myNegativeList As List(Of ListItems) = getMyList
'Psuedo code here
Dim Cust = From Notice In NoticeTable _
Where Notice.Name not in (Select Name from myList where Amount >= 15)
End Sub
How do I do a Linq query excluding names (existing in myNegativeList AND amount >= 15)