给定请求“foo?Bar=baz”,我们的 RequestResource 过去在资源的属性“Bar”中填充了值“baz”。
知道为什么这可能会损坏吗?ServiceStack 最近有什么重大变化吗?我们已从 3.9.17.0 升级到 3.9.32(在 .33 上也失败了)。干杯
编码:
[DataContract(Name = "Response")]
public class ItemsServiceResource
{
public ItemsServiceResource()
{
PageInfo = new PageInfo
{
PageNumber = 1,
PageSize = 100
};
}
[DataMember]
public int UserId { get; set; }
[DataMember]
public PageInfo PageInfo { get; set; }
[DataMember]
[JsonProperty]
public List<Model.Item> Items { get; set; }
// this is the property that comes now as null instead of being populated
public string SearchTerm { get; set; }
}
public class ItemsService : RestServiceBase<ItemsServiceResource>
{
public override object OnGet(ItemsServiceResource request)
{
//do work
}
}
端点注册是:
public class AppHost
{
public AppHost()
: base("blah Host") {}
public override void Configure(Funq.Container container)
{
Routes
.Add<ItemsServiceResource>("/user/{userId}/items/")
}
}