Mark
Mark

Reputation: 2203

ServiceStack - AutoQuery Admin View

I am using ServiceStack v.5.02.

Issue: The AutoQuery 'views'/classes no longer automatically appear in the ServiceStack admin view.

Steps taken:

Firstly, I created a Customer class.

[Alias("Customers")]
public class Customer
{
    [AutoIncrement]
    public int Id { get; set; }
     }
    public string Name { get; set; }
}

Secondly, Created Routes for AutoQuery as per below:

[Route("/query/customers")]
public class QueryCustomers : QueryDb<Customer> {}

However, when viewing the SS admin view at /ss_admin/ , the above queries are not 'seen' by the admin viewer.

Note 2: I then changed the route class to 'QueryData'

  [Route("/query/customers")]
 public class QueryCustomers : QueryData<Customer> {}

The Admin view then found the autoquery view, however, I am then getting a

NotSupportedException: No datasource was registered on AutoQueryDataFeature for Type 'Customer'

Upvotes: 0

Views: 64

Answers (0)

Related Questions