CLR类型到EDM类型的映射是模棱两可的,因为在我的项目中又添加了一个Entity之后,多个CLR类型与EDM类型匹配?

时间:2019-01-04 15:59:12

标签: asp.net entity-framework entity-framework-6 database-first

在我的项目中Entity Framework项目与代码优先方法一起使用。通过添加字段和表来进行数据库更改。

我尝试使用数据库优先方法中的另一个实体,而没有涉及前一个。

我尝试为新的EF模型创建另一个项目,然后将其添加到当前项目中,但是在当前项目中,我们实现了IdentityDBcontext Application用户和令牌方案,我不想再做一次。

现在,我在同一项目中添加了EF DB优先方法,但出现此错误,

Schema specified is not valid. Errors: 
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'Log'. Previously found CLR type 'WebService.Models.Log', newly found CLR type 'WebService.Entityframework.Log'.
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'NormalUser'. Previously found CLR type 'WebService.Models.NormalUser', newly found CLR type 'WebService.Entityframework.NormalUser'.
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'ProgramDetail'. Previously found CLR type 'WebService.Models.ProgramDetail', newly found CLR type 'WebService.Entityframework.ProgramDetail'.

有解决此错误的解决方案吗?

希望您的建议

0 个答案:

没有答案