can someone please assist me adjust my syntax below. I keep getting an error that says "Error 403 'bool' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'bool' could be found (are you missing a using directive or an assembly reference?)"
var workerRecords =
from oe in context.tbl_Company_Workers.ToList()
where(
w => w.WorkerRoleID.HasValue && w.WorkerRoleID == 3
).ToList();
whereandToList()is enough to get this work .Please correct me if I'm wrong , I use select if i'm selecting particular properties only .var result = Collection.Where(g=>g.Id >5).ToList()andvar result2 = Collection.Where(g=>g.Id>5).Select(h=>h.Id).ToList();var workerRecords = context.tbl_Company_Workers.Where(w => w.WorkerRoleID.HasValue && w.WorkerRoleID == 3).ToList();Selectto get the data .