How do I correctly write this LINQ statement? I have this list (outfalls) of class Outfall. It works without the WHERE clause. When I added the WHERE it throws a NullReferenceException.
outfalls = outfalls
.Select(x => new Outfall { loc_name = x.sys_loc_code, planned_task_code = x.planned_task_code })
.Where(x => x.planned_task_code.Contains("DAILY"))
.ToList();