There is a nuget package that allows you to search for strings by several properties.
This will allow the use of the following code ...
CustomerList.Search(addressToMatch,
Function(c) c.Address,
Function(c) c.City)
When connecting to sql database, the created sql will look like:
SELECT [Extent1].[Address] AS [Address],
[Extent1].[City] AS [City]
FROM [dbo].[Table] AS [Extent1]
WHERE ([Extent1].[Address] LIKE N'%searchTerm%')
OR ([Extent1].[City] LIKE N'%searchTerm%')
Hope this helps
source
share