How to filter a boolean field in linq in the where statement?
i've try the following examples:
Code: Select all
LWhere := '(Container.Active = true)'; // Invalid expression (true)
LWhere := '(Container.Active = '1'); // Invalid node type {46}
This works fine:
Code: Select all
LWhere := '(Relatie.Snelcode.Contains(''%' + edtSnelcode.text + '%''))' +
' and (Relatie.ZoekNaam.Contains(''%' + edtZoeknaam.text + '%''))';
Code: Select all
LWhere := '(Relatie.Snelcode.Contains(''%' + edtSnelcode.text + '%''))' +
' and (Relatie.ZoekNaam.Contains(''%' + edtZoeknaam.text + '%''))'+
' and (Relatie.RelatieNaam.Contains(''%' + edtRelatienaam.text + '%''))';
Code: Select all
LWhere := '(Relatie.Snelcode.Contains(''%%'')) and (Relatie.ZoekNaam.Contains(''%%'')) and (Relatie.RelatieNaam.Contains(''%%''))'
Code: Select all
LQuery := From('Relatie').Where(LWhere).OrderBy('Relatie.Snelcode').Select();
LList := DataContext.GetEntities<TRelatie>(LQuery).ToList;