【发布时间】:2014-03-30 02:08:26
【问题描述】:
有人知道您可以提供一些示例数据以显示在 ServiceStack 中的元数据页面上以用于响应模型吗?
对于这个响应模型
public class GetIncidentResponse
{
public IEnumerable<Incident> Incidents { get; set; }
}
我在元数据页面上得到了这个
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{}
当我希望能够显示类似的东西时
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{ "Filter example 1", "Filter example 2"}
【问题讨论】:
-
避免使用interfaces in DTO。请改用具体的
List<T>。
标签: servicestack