Serge P.
Serge P.

Reputation: 327

ServiceStack new API for v3

Is it possible to write

var request = new OrderRequest { Id = 1 };
var response = client.Get(request);

with ServiceStack v3.9.71?

According to https://github.com/ServiceStackV3/ServiceStackV3/wiki/New-API it is, but I can't find the IReturn<TResponse> interface in this version.

Upvotes: 0

Views: 137

Answers (1)

mythz
mythz

Reputation: 143319

Yes you're looking at the New API in the v3 wiki documentation.

The Get API you're looking for exists in the v3 branch as part of the ServiceClientBase API:

TResponse Get<TResponse>(IReturn<TResponse> request)

The IReturn interface markers you're looking for is in the IService.cs class which is in the ServiceStack.ServiceHost namespace.

Using a productivity tool like ReSharper will make it easier to find and add missing references, otherwise you can search ServiceStack's GitHub v3 branch online.

Upvotes: 1

Related Questions