Hi,
We use the EntityDac in our Delphi project, but how to use a like statement for searching records?
SQL Example:
Where IsNull(Column, '') LIKE '%' + :parameter + '%'
Like
Re: Like
Hello,
An analogue for the LIKE SQL operator is the Contains operator in LINQ :
An analogue for the LIKE SQL operator is the Contains operator in LINQ :
Code: Select all
var
E: IEmpExpression;
Query: ILinqQueryable;
begin
E := Context.Emp;
Query := Linq.From(E)
.Where(E.EName.Contains('%TEST%'))
.Select([E.EmpNo, E.EName, E.Dept.DName]);
...
end;