实体框架电动工具4,生成视图错误

时间:2017-04-27 19:39:25

标签: c# mysql .net entity-framework

当我去我的模板中包含一个新列时,当我去上下文给出一个实体框架>生成视图,它会出现此错误:

-

System.Reflection.TargetInvocationException:调用目标抛出了异常。 ---> System.NullReferenceException:未将对象引用设置为对象的实例。    at MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection连接)    在System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection连接)    at MySql.Data.Entity.MySqlManifestTokenResolver.ResolveManifestToken(DbConnection连接)    在System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection连接,DbProviderManifest& providerManifest)    在System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)    在System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)    在System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput输入)    在System.Data.Entity.Internal.LazyInternalContext.InitializeContext()    在System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()    at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()    ---内部异常堆栈跟踪结束---    at System.RuntimeMethodHandle.InvokeMethod(Object target,Object [] arguments,Signature sig,Boolean constructor)    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments)    在System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)    at System.RuntimeType.InvokeMember(String name,BindingFlags bindingFlags,Binder binder,Object target,Object [] providedArgs,ParameterModifier [] modifiers,CultureInfo culture,String [] namedParams)    在CallSite.Target(Closure,CallSite,Object,String,BindingFlags,Object,Object,Object)    at Microsoft.DbContextPackage.DbContextPackage.GetObjectContext(Object context)    在Microsoft.DbContextPackage.Handlers.OptimizeContextHandler.OptimizeContext(对象上下文)

0 个答案:

没有答案