2012-01-25 111 views
0

OpenRasta处理程序是否有可能接受资源作为参数。
对于一个URI(例如) “/搜索/” 可能我过去是这样的:在openrasta中传递对象作为参数get方法

public class SearchRequest 
{ 
    public string Term { get; set; } 
    public string[] Categories { get; set; } 
    public int LimitPerPage { get; set; } 
    public int CurrentPage { get; set; } 
} 

在我的处理程序,有类似:

public List<SearchResult> Get(SearchRequest request) 

还是我更好的创作我的URI与那些查询字符串的参数?

回答

3

如果你有一个GET,你必须在URI中声明你期望的参数。您可以简单地在AtUri中声明/ search?page = {CurrentPage}。

+0

这么想,谢谢:-) – Alex

相关问题