【发布时间】:2021-10-25 10:17:36
【问题描述】:
当我查询 AutoQuery 服务(常规 GET 请求)时,我会在日志中收到警告,即使请求工作正常。警告如下所示,对于 URL:https://localhost:5001/employees?BirthDate%3E=1950-01-01
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/2 GET https://localhost:5001/employees?BirthDate%3E=1950-01-01 - -
warn: ServiceStack.Serialization.StringMapTypeDeserializer[0]
Property 'birthdate>' does not exist on type 'autoquery.ServiceModel.AutoQueries+QueryEmployee'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/2 GET https://localhost:5001/employees?BirthDate%3E=1950-01-01 - - - 200 - text/html 291.5297ms
我创建了一个示例,使用 Northwind 数据库,我使用x mix northwind.sqlite 和来自官方示例的 DTO:https://github.com/ServiceStackApps/Northwind/blob/master/src/Northwind/Northwind.ServiceModel/Types/Employee.cs。
这个“错误警告”有点麻烦,因为没有任何问题,而且它会在我的日志中填满我需要忽略的警告。特别是因为我已经在日志中为 WARN+ERR 设置了警报。
【问题讨论】:
标签: servicestack servicestack-autoquery