Trying to get Locode working with Data Service type AutoQuery. As long as the query DTO inherits from QueryDb type, the locode icon appears in the browser and the query endpoint gets called from the browser. When I change the DTO class to inherit from QueryData type, the Locode icon does not appear on the UI anymore. Is there a way to get Locode working with Data Service type of AutoQuery?
The query DTO in ServiceModel/Hello.cs file:
[Route("/hellos", "GET")]
public class QueryHellos :
QueryData<HelloResponse>,
IReturn<QueryResponse<HelloResponse>>,
IGet
{
}
ServiceInterface:
public class MyServices : Service
{
public object Any(Hello request)
{
return new HelloResponse { Result = $"Hello, {request.Name}!" };
}
public List<HelloResponse> Get(GetHellos request)
{
return new List<HelloResponse>() { new HelloResponse { Result = "first" }, new HelloResponse { Result = "second" } };
}
}
In Configure.AutoQuery.cs I’ve added call to:
appHost.Plugins.Add(
new AutoQueryDataFeature { MaxLimit = 1000 }
.AddDataSource(ctx => ctx.ServiceSource<HelloResponse>( new GetHellos()))
);
Am I missing something?