我使用visual studio 2012和创建portable class library来定义我的数据库域。当我使用class library, 可以添加System.ComponentModel.DataAnnotations和System.ComponentModel.DataAnnotations.Schema引用并且可以使用Foreignkey,Table和NotMapped属性来定义我的域类。但是在创建时portable class library我不能使用这个属性并且不能添加上面的引用。我想创建Silverlight应用程序并且无法引用类库。
提前致谢。