Try
/Queries/SO_Main, which queries the main table for sales orders(SO_Main), directly.
This is what under ServiceStack is refered to as an Auto Query for more information on this see the documentation
https://docs.servicestack.net/autoquery/rdbms.
Basically all the tables that are in the database are generated into the Service Model name space(JiwaFinancials.Jiwa.JiwaServiceModel.Tables) and whilst not all of them are registered as routes you can add them with one line of code like this
- Code: Select all
AppHost.Routes.Add(typeof(SO_MainQuery), "/Queries/SO_Main", "GET", "Retrieves a list of sales orders.", "");
Where basically in this case we want access to the SO_Main table, the class with all the qurey parameters is called SO_MainQuery(convention of table name and Query on the end), /Queries/SO_Main(the route) can be whatever you like but by convention they are placed under Query, be aware if you add any routes the Http Verb must be all upper case.