报错信息:
异常: Unable to determine the provider name for provider factory of type 'MySql.Data.MySqlClient.MySqlClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config. ⑥ 来源: EntityFramework ⑦ 实例: 在 System.Data.Entity.Utilities.DbProviderFactoryExtensions.GetProviderInvariantName(DbProviderFactory factory) 在 System.Data.Entity.Infrastructure.DependencyResolution.DefaultInvariantNameResolver.GetService(Type type, Object key) 在 System.Collections.Concurrent.ConcurrentDictionary+2.GetOrAdd(TKey key, Func+2 valueFactory) 在 System.Linq.Enumerable.WhereSelectArrayIterator+2.MoveNext() 在 System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable+1 source, Func+2 predicate) 在 System.Data.Entity.Infrastructure.DependencyResolution.RootDependencyResolver.GetService(Type type, Object key) 在 System.Linq.Enumerable.WhereSelectArrayIterator+2.MoveNext() 在 System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable+1 source, Func+2 predicate) 在 System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver+2.GetService(Type type, Object key) 在 System.Data.Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService[T](IDbDependencyResolver resolver, Object key) 在 System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInvariantName(DbConnection connection) 在 System.Data.Entity.Internal.InternalConnection.get_ProviderName() 在 System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context) 在 System.Data.Entity.Internal.LazyInternalContext.InitializeContext() 在 System.Data.Entity.Internal.InternalContext.Initialize() 在 System.Data.Entity.Internal.LazyInternalContext.get_ObjectContext() 在 System.Data.Entity.Internal.InternalContext.GetStateEntry(Object entity) 在 System.Data.Entity.Internal.InternalEntityEntry..ctor(InternalContext internalContext, Object entity) 在 System.Data.Entity.DbContext.Entry[TEntity](TEntity entity) 在 Qianchen.DataBase.MySqlEx.Database.Insert[T](T entity) 在 Qianchen.Application.Base.SystemModule.LogService.WriteLog(LogEntity logEntity)
Web.config文件加入配置解决:
以上就是土嘎嘎小编大虾米为大家整理的相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!