So found a really odd issue in the DataTable Select method. Here's code from a console app that demonstrates it:
string filterSt = "event_id=203518 AND (1=1 and not(event_id=203518))";
DataTable dt = new DataTable();
dt.Columns.AddRange(
new[] { new DataColumn("event_id", typeof(int)), new DataColumn("venue_id", typeof(int)) });
dt.Rows.Add(203518, 1356);
foreach (var dr in dt.Select(filterSt))
{
Console.WriteLine("This should not appear");
}
Console.WriteLine("done");
Console.ReadKey();
What's really odd is that if you change the filter string to this, it works correctly:
string filterSt = "1=1 AND (1=1 and not(event_id=203518))";
Am I going crazy or is this a bug in .NET?