数据类型 数据注释

发布于 2024-12-14 19:38:57 字数 71 浏览 2 评论 0原文

由于类中的每个属性都有 DataType,数据注释中需要 DataType 吗?

谢谢

Since every property in class has DataType what is need for DataType in data annotation?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不羁少年 2024-12-21 19:38:57

DataType 属性用于标记属性的“真实”数据类型。
例如,类型为 string 的属性可以是 DataType.PhoneNumber 或对帖子的评论 (DataType.MultilineText)。

The DataType attribute is for marking the "real" data type for the property.
For example, a property typed string can be a DataType.PhoneNumber or a comment to a post (DataType.MultilineText).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文