ActionResult 帮助器和不同类型的解析器
想法是对不同类型的结果使用相同的操作方法 IE
/category/details/?resultFormat=json
/类别/详细信息/?resultFormat=xml
所以要有某种包含已注册的值解析器对的 ActionResult 帮助器
“json”,JsonValueResolver
“xml”,XmlResolver
等...是否已经有解决方案,或者我必须考虑某种自定义解析器? Automapper对于值解析有很好的解决方案。有什么想法吗?
Idea is to use same action methods for different types of results
I.E.
/category/details/?resultFormat=json
/category/details/?resultFormat=xml
So to have some kind of ActionResult helper that contains registered pairs of value resolvers
"json", JsonValueResolver
"xml", XmlResolver
etc...is there already solution for this or I have to think some kind of custom resolver?
Automapper has good solution for value resolving. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)