I have a list of string like this
List<string> list1 = new List<string>();
For example my list is
{one , two , three , four , five}
In database I have a string like this
"five-six-seven-eight"
How I can use Linq to SQL to search between my string in database and my list. For example my query search should be true because "five" is common on both. My query is this:
var q = from p in m.ViewAbuseReports where
(list1.Contains(p.Abuse.ToString().Split('-')) || list1.Count == 0)
select new
{
Col2 = p.FirstName + " " + p.LastName,
Col3 = p.DateTakhalof,
Col4 = p.DateReturn
};
Intersect