我试图从ServiceStack.DataAnnotations使用ServiceStack的属性装饰器,但是当我在MSVS对象浏览器中查看ServiceStack.DataAnnotations命名空间时,只有以下几种类型:

ComputeAttribute
DecimalLengthAttribute
忽略属性
PrimaryKeyAttribute

我有最新的垃圾箱,所有参考资料都已签出。具体来说,我想使用[AutoIncrement]和[Index]属性。

谢谢

最佳答案

[AutoIncrement]和[Index]属性位于无依赖项ServiceStack.Interfaces.dll的ServiceStack.Interfaces.DataAnnotations命名空间中,如果您使用的是NuGet,则可以在ServiceStack.Common NuGet package内部找到。

关于c# - ServiceStack.DataAnnotations缺少属性定义?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/11378284/

10-13 07:46