ServiceStack.DataAnnotations missing attributes definitions?

给你一囗甜甜゛ 提交于 2019-12-11 01:20:04

问题


I'm trying to use ServiceStack's attribute decorators from ServiceStack.DataAnnotations but when I view the ServiceStack.DataAnnotations namespace in the MSVS Object Browser, there are only the following types:

ComputeAttribute DecimalLengthAttribute IgnoreAttribute PrimaryKeyAttribute

I have the latest bins and all of my references check out. Specifically, I'm looking to use the [AutoIncrement] and [Index] attribs.

Thanks


回答1:


The [AutoIncrement] and [Index] attributes are in the ServiceStack.Interfaces.DataAnnotations namespace in the dependency-free ServiceStack.Interfaces.dll which if you're using NuGet you can find inside the ServiceStack.Common NuGet package.



来源:https://stackoverflow.com/questions/11378284/servicestack-dataannotations-missing-attributes-definitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!