Krillehbg
Krillehbg

Reputation: 185

Servicestack Autoquery problems after update to 4.0.62

i have recently upgraded to ServiceStack v4.0.62

and now my project doesnt compile. I have change my AutoQuery to IAutoQueryData but then none of my .Where and .Select and so on works anymore.

Please guide

enter image description here

If i leave it with IAutoQuery i get this error instead enter image description here

Upvotes: 1

Views: 119

Answers (1)

mythz
mythz

Reputation: 143359

ServiceStack introduced an alternative AutoQuery Data implementation in v4.0.56 which lets you create AutoQuery Services for alternative data sources inc. Querying In Memory Datasets, Querying Responses from existing Services and Querying DynamoDB.

The breaking changes section in v4.0.58 Release Notes covers the changes to AutoQuery which is now called IAutoQueryDb which should've also be listed in the Obsolete message on the deprecated IAutoQuery interface.

In summary, rename to IAutoQueryDb and if you're going to use IAutoQuery directly it's better if you pass in the entire IRequest as it will then be able to participate in Multitenancy requests, so your query should now become:

public IAutoQueryDb AutoQuery { get; set; }

public object Get(ResourceTimeExceptionQuery request)
{ 
    var q = AutoQuery.Create(request, base.Request);
}

Upvotes: 1

Related Questions