I'm trying to display my XData service in a XDataWebDataset (in a win64 app). I have a problem that I don't know how to use the server response in the dataset.
Server method is this:
function TEasyService.QueryProducts(Query: TXDataQuery): TList<TProduct>;
begin
Result := TXDataOperationContext.Current.CreateCriteria<TProduct>(Query).List;
end;
Now I try to do something like this - of course is not working :)
> procedure TForm1.btnViewProductsClick(Sender: TObject);
> var qry: TXDataQuery;
> begin
> var Client := GetClient;
> var EasyService := Client.Service<IEasyService>;
> qry := TXDataQuery.Create;
> var list := EasyService.QueryProducts(qry);
> xdsView.Load;
> Client.Free;
> end;
The question is - how do I use the list that the server returns?
I'm not sure if you checked the documentation about creating XData client app using Web Core? The commented code you provided is for regular Delphi applications, not Web Core. Here is the chapter: https://doc.tmssoftware.com/biz/xdata/guide/web.html
But be aware that TXDataClient object must not be destroyed while the dataset is open, otherwise it will destroy the returned objects and the dataset will try to use destroyed objects.