我第一次使用EF模型MVC不明确的引用,我有问题与此错误:“RequiredAttribute标签”是MVC
'RequiredAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.RequiredAttribute' and 'ServiceStack.DataAnnotations.RequiredAttribute
我不能使用System.ComponentModel.DataAnnotations
和ServiceStack.DataAnnotations
。我需要他们两人索引列和也要求列
我无法找到解决方案。
你试过'[System.ComponentModel.DataAnnotations.Required]'还是'[ServiceStack.DataAnnotations.Required]'? – jao 2014-10-07 12:23:56
感谢你回答 我使用 using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema;使用ServiceStack.DataAnnotations的 ; – RaziHosseiny 2014-10-12 12:19:38