使用不同程序集中的相同实体模型

时间:2013-12-06 17:42:29

标签: asp.net-mvc

我创建了一个模块化的asp.net MVC应用程序。我正在使用动态实体框架将实体模型添加到dbcontext:

我有一个类别实体,我想在一个解决方案中在不同项目中使用此实体。当我运行应用程序时,我看到这个错误:

The type 'Module.Pages.Models.Category' and the type 'Module.Menus.Models.Category' both have the same simple name of 'Category' and so cannot be used in the same model. All types in a given model must have unique simple names. Use 'NotMappedAttribute' or call Ignore in the Code First fluent API to explicitly exclude a property or type from the model

0 个答案:

没有答案
相关问题