SQL logic to Aurelius logic

Hi,
I guess you need to write a custom XData service interface for that, where you can do

var
  MyCriteria: TCriteria<TMyEntity>;
begin
  MyCriteria := Manager.Find<TMyEntity>.Where(Linq.Gt('FieldA', 0));
  if AFilter1>0 then
    MyCriteria.Add(Linq.Eq('FieldA', AField1));
  {...and so on...}
  Result := MyCriteria.List;
end;

HTH

1 Like