У меня есть решение с общим пользовательским кодом "code-first" Объект DbContext.EF: Метод не найден: 'System.Data.Entity.Core.Metadata.Edm.EdmModel System.Data.Entity.Infrastructure.DbModel.get_StoreModel()'
С сегодняшнего дня в одном из проектов при попытке получить доступ к лицам, таким образом,
using(var cx = new MyContext())
{
var data = cx.Persons;
}
я получаю следующее исключение.
{"Method not found: 'System.Data.Entity.Core.Metadata.Edm.EdmModel System.Data.Entity.Infrastructure.DbModel.get_StoreModel()'."}
[System.MissingMethodException]: {"Method not found: 'System.Data.Entity.Core.Metadata.Edm.EdmModel System.Data.Entity.Infrastructure.DbModel.get_StoreModel()'."}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
HResult: -2146233069
InnerException: null
Message: "Method not found: 'System.Data.Entity.Core.Metadata.Edm.EdmModel System.Data.Entity.Infrastructure.DbModel.get_StoreModel()'."
Source: "CodeFirstStoreFunctions"
StackTrace: " at CodeFirstStoreFunctions.FunctionsConvention.Apply(EntityContainer item, DbModel model)\r\n
atSystem.Data.Entity.ModelConfiguration.Configuration.ConventionsConfiguration.ModelConventionDispatcher.Dispatch[T](T item)\r\n
at System.Data.Entity.ModelConfiguration.Configuration.ConventionsConfiguration.ModelConventionDispatcher.VisitEdmEntityContainer(EntityContainer item)\r\n
at System.Data.Entity.Edm.EdmModelVisitor.VisitCollection[T](IEnumerable`1 collection, Action`1 visitMethod)\r\n at System.Data.Entity.Edm.EdmModelVisitor.VisitEntityContainers(IEnumerable`1 entityContainers)\r\n at System.Data.Entity.Edm.EdmModelVisitor.VisitEdmModel(EdmModel item)\r\n at System.Data.Entity.ModelConfiguration.Configuration.ConventionsConfiguration.ModelConventionDispatcher.VisitEdmModel(EdmModel item)\r\n
at System.Data.Entity.ModelConfiguration.Configuration.ConventionsConfiguration.ModelConventionDispatcher.Dispatch()\r\n at System.Data.Entity.ModelConfiguration.Configuration.Conven
tionsConfiguration.ApplyStoreModel(DbModel model)\r\n
at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)\r\n at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)\r\n at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)\r\n at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)\r\n at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()\r\n at System.Data.Entity.Internal.InternalContext.Initialize()\r\n at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)\r\n at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()\r\n at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator()\r\n at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at ... }
Это очень странно, потому что в других проектах пользовательский Контекст работает нормально.
Что I'tried:
- Чистых и Rrebuild
- Сравниваемых строки подключения
Что означает сообщение означает?
Любая помощь приветствуется.