1

Firstly, I am amazed at how simple and performant ServiceStack is. Can't believe I've gone without sing this for so long.

I'm especially loving the AutoQuery and Admin feature, but for the life of me, I'm struggling to find documentation on how to extend the response. What I am trying to do is provide a hyperlink in a response to enable navigation right from a row that is returned.

For example, if a list of records are returned from /records, and the primary key (Id field) could actually be a link (ie ABC123) that is its own DTO.

I've noticed the AutoQueryMetadataFeature, so suspect this provides some hints, but very new to the whole solution so any pointers would be very much appreciated.

Cheers Craig

Craig D
  • 487
  • 1
  • 5
  • 17
  • It's not clear on what you're hoping to do, where exactly do you want the hyperlink, in a HTML response? Which one? Because AutoQuery Services return data, its very rarely ever called to return its data in a HTML page. – mythz Aug 01 '17 at 16:49
  • Thanks for the quick response and apologies for my clumsy descriptions. It is probably better described as how to render the results in the Admin UI (the one that has the default title of Snapshot of Query Generated by ServiceStack). When the rows are returned, the primary key could potentially be turned into a reference to be used in another DTO as a parameter so that you can get a kind of ad-hoc user interface to drill between lists and items, – Craig D Aug 02 '17 at 14:07
  • ...or how the admin UI can provide custom rendering of the response. Not about modifying the actual response. Take a very simple example of formatting a DateTime into a given format, or having a numeric show up on screen with a custom numeric format. From the question above, rendering the html in the page as a link based on the content of the id field that enables you to click on it and be taken to it's query page. – Craig D Aug 02 '17 at 14:15
  • Do you mean the Admin UI? That's not a customisable UI, it's meant to provide a generic UI to query any AutoQuery Service. You'd need to create a Custom build of [ServiceStack/Admin](https://github.com/ServiceStack/Admin) if you want to change how that UI looks. – mythz Aug 02 '17 at 16:36

0 Answers0