更新到 4.0.62 后的 Servicestack Autoquery 问题

Servicestack Autoquery problems after update to 4.0.62

我最近升级到 ServiceStack v4.0.62

现在我的项目无法编译。 我已将我的 AutoQuery 更改为 IAutoQueryData,但我的 .Where 和 .Select 的 none 等不再起作用。

请指导

如果我将其保留为 IAutoQuery,则会出现此错误

ServiceStack 引入了替代方案 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

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.

总而言之,重命名为 IAutoQueryDb,如果您要直接使用 IAutoQuery,最好传入整个 IRequest,因为它将能够 participate in Multitenancy requests,所以您的查询现在应该变成:

public IAutoQueryDb AutoQuery { get; set; }

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