我的 EF 代码优先上下文目前出现以下错误:
Unhandled Exception: System.Data.MetadataException: Schema specified is not valid. Errors:
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'Offer'. Previously found CLR type 'CakeExtracter.CakeMarketingApi.Entities.Offer', newly found CLR type 'Cake
Extracter.Data.CakeTraffic.Offer'.
at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection
, Action`1 logLoadMessage)
at System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action`1 logLoadMessage)
at System.Data.Entity.Infrastructure.DbCompiledModel.CreateObjectContext[TContext](DbConnection existingConnection)
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
除了创建一个单独的项目以便这两个上下文存在于不同的程序集中之外,还有什么方法可以解决这个问题?