EntityFramework Code 6.1.2 with .Net FX 4.5.3 MaxLengthAttribute Confilict

时间:2015-01-15 20:04:51

标签: c# ef-code-first entity-framework-6

您好我正在使用最新的EF版本6.1.2代码和最新的.Net框架4.5.3,我真的需要使用MaxLength属性,因为我有一个唯一的密钥(必须指定长度),无论如何我得到错误说我在EntityFramework.dll程序集和System.ComponentModel.DataAnnotations.dll程序集之间存在冲突,因为它们包含MaxLengthAttribute。

有没有办法明确指定MaxLengthAttribute

NB EntityFramework.dll 中,我们拥有属性System.ComponentModel.DataAnnotations.MaxLengthAttribute的完整参考

System.ComponentModel.DataAnnotations.dll 中,我们拥有属性System.ComponentModel.DataAnnotations.MaxLengthAttribute的完整参考

0 个答案:

没有答案