南希是否模型绑定到按文档或不字段? [英] Does Nancy model bind to fields as per the documentation or not?

查看:144
本文介绍了南希是否模型绑定到按文档或不字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了模型绑定和文档的一个非常简单的例子南希(的https:/ /github.com/NancyFx/Nancy/wiki/Model-binding )表示,字段也同样可用作性能,但在实践中,它们似乎只是当我使用属性绑定

I have tried a really simple Nancy example for model binding and the documentation (https://github.com/NancyFx/Nancy/wiki/Model-binding) says that fields are just as usable as properties, but in practice they only seem to bind when I use properties.

是文档的权利(如果是的话,为什么没有我的模型绑定?),或者是文档错误的(如果是的话,为什么?)

Is the documentation right (if so, why isn't my model binding?) or is the documentation wrong (if so, why?)

推荐答案

不支持模式结合领域的直到V1 。只要你使用V1或更新这应该工作的开箱。如果没有你能提供一些code与南希的版本,您正在使用沿着重现问题?

Model binding to fields wasn't supported until v1. As long as you're using v1 or newer this should work out of the box. If it doesn't could you provide some code that reproduces the issue along with the version of Nancy you're using?

由于文档针对最新的版本,它可以是混乱作为其特征在每个版本的支持。目前找到的版本信息像这样的改变最好的地方是在重大更改页面

Since the documentation targets the most recent version it can be confusing as to which features are supported in each version. At the moment the best place to find version information for changes like this is on the breaking changes page.

这篇关于南希是否模型绑定到按文档或不字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆