About
Whether you're using C# or VB.NET, you can add the ServiceStackVS extension to Visual Studio which will add the references needed to use the ServiceStack client, and also visit the REST API and retrieve all the DTO classes and place them in a file, accessible to your code.
No need to generate the DTO's or copy-paste.
Steps
- Install the ServiceStackVS extension
- Add the nuget package ServiceStack.Client
- Add References to System.Runtime.Serialization and System.Net
- Right-click on the project and choose "Add ServiceStack Reference..."
- Enter the address of the host and name the service
A file (JiwaServiceReference.dtos.cs or JiwaServiceReference.dtos.vb) will be added to your project containing all the DTO's you'll need to consume the REST API.