My ef journey to connect mysql and ef journey to connect mysql
Baidu: ef5 mysqlhttp: // my.oschina.net/u/170703/blog/210814? P = 1 Baidu: dotconnect for mysql can be found on the Limit Software WebsiteDcmysql{"Error occurred when creating the configuration section handler for entityFramework: failed to Load file or assembly" EntityFramework, Version = 4.4.0.0, Culture = neutral, publicKeyToken = b77a5c561934e089 "or one of its dependencies. The Assembly list definition found does not match the Assembly reference. (Exception from HRESULT: 0x80131040) (D: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ web. config line 9) "} the user code has not been processed. System. typeInitializationException
Hresults =-2146233036
An exception is thrown when the type Initial Value of Message = "BLL. BasicBll. ChemapaoBll" is set.
Source = BLL
TypeName = BLL. BasicBll. ChemapaoBll
StackTrace:
In BLL. BasicBll. ChemapaoBll. GetEmployees (Int64 entId)
At the Location d: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ Controllers \ QueryController. cs at TravelWebApi. Controllers (Int64 entId): Row 36
In lambda_method (Closure, ControllerBase, Object [])
In System. Web. Mvc. ActionMethodDispatcher. Execute (ControllerBase controller, Object [] parameters)
In System. Web. Mvc. ReflectedActionDescriptor. Execute (ControllerContext controllerContext, IDictionary '2 parameters)
In System. Web. Mvc. ControllerActionInvoker. InvokeActionMethod (ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary '2 parameters)
In System. Web. Mvc. Async. AsyncControllerActionInvoker. <> c _ DisplayClass42. <BeginInvokeSynchronousActionMethod> B _ 41 ()
In System. Web. Mvc. Async. AsyncResultWrapper. <> c _ DisplayClass8 '1. <BeginSynchronous> B _ 7 (IAsyncResult _)
In System. Web. Mvc. Async. AsyncResultWrapper. WrappedAsyncResult '1. End ()
In System. Web. Mvc. Async. AsyncControllerActionInvoker. EndInvokeActionMethod (IAsyncResult asyncResult)
In System. Web. Mvc. Async. AsyncControllerActionInvoker. <> c _ DisplayClass37. <> c _ DisplayClass39. <BeginInvokeActionMethodWithFilters> B _ 33 ()
In System. Web. Mvc. Async. AsyncControllerActionInvoker. <> c _ DisplayClass4f. <InvokeActionMethodFilterAsynchronously> B _ 49 ()
InnerException: System. TypeInitializationException
Hresults =-2146233036
Message = "System. Data. Entity. Internal. AppConfig" type initialization item raises an exception.
Source = EntityFramework
TypeName = System. Data. Entity. Internal. AppConfig
StackTrace:
In System. Data. Entity. Internal. AppConfig. get_DefaultInstance ()
In System. Data. Entity. Internal. LazyInternalConnection.. ctor (DbContext context, String nameOrConnectionString)
In System. Data. Entity. DbContext .. ctor (String nameOrConnectionString)
In EF. ChemapaoEntities .. ctor () Location d: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ DataAccess \ EF \ Chemapao. Context. cs: Row 18
In BLL. BasicBll. ChemapaoBll .. cctor () Location d: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ Business \ BLL \ BasicBll \ ChemapaoBll. cs: Row 15
InnerException: System. Configuration. ConfigurationErrorsException
Hresults =-2146232062
Message = An error occurred while creating the configuration section handler for entityFramework: failed to load the file or the Assembly "EntityFramework, Version = 4.4.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089" or one of its dependencies. The Assembly list definition found does not match the Assembly reference. (Exception from HRESULT: 0x80131040) (D: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ web. config line 9)
Source = System. Configuration
BareMessage = An error occurred while creating the configuration section handler for entityFramework: failed to load the file or assembly "EntityFramework, Version = 4.4.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089" or a dependency of it. The Assembly list definition found does not match the Assembly reference. (Exception from HRESULT: 0x80131040)
Filename = D: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ web. config
Line = 9
StackTrace:
In System. Configuration. BaseConfigurationRecord. FindAndEnsureFactoryRecord (String configKey, Boolean & isRootDeclaredHere)
In System. Configuration. BaseConfigurationRecord. GetSectionRecursive (String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object & result, Object & resultRuntimeObject)
In System. Configuration. BaseConfigurationRecord. GetSection (String configKey)
In System. Web. HttpContext. GetSection (String sectionName)
In System. Web. Configuration. HttpConfigurationSystem. GetSection (String sectionName)
In System. Web. Configuration. HttpConfigurationSystem. System. Configuration. Internal. IInternalConfigSystem. GetSection (String configKey)
In System. Configuration. ConfigurationManager. GetSection (String sectionName)
In System. Data. Entity. Internal. AppConfig.. ctor ()
In System. Data. Entity. Internal. AppConfig.. cctor ()
InnerException: System. IO. FileLoadException
Hresults =-2146234304
Message = failed to Load file or assembly "EntityFramework, Version = 4.4.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089" or one of its dependencies. The Assembly list definition found does not match the Assembly reference. (Exception from HRESULT: 0x80131040)
Source = System. Configuration
FileName = EntityFramework, Version = 4.4.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
FusionLog === pre-binding status information ===
Log: DisplayName = EntityFramework, Version = 4.4.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
(Fully-specified)
Log: Appbase = file: // D:/SourceProject/chuxing_ver1/trunk/TravelWebApi/
Log: initial PrivatePath = D: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ bin
Call the Assembly: System. Web. Providers, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35.
===
Log: This binding starts from loading the context by default.
Log: Using application configuration file: D: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ web. config
Log: Use the host configuration file C: \ Users \ Administrator \ Documents ents \ IISExpress \ config \ aspnet. config
Log: use the computer configuration file C: \ Windows \ Microsoft. NET \ Framework \ v4.0.30319 \ config \ machine. config.
Log: Find the redirection in the application configuration file: 4.4.0.0 has been redirected to 5.0.0.0.
Log: reference after policy: EntityFramework, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
Log: download the new URL file: // C:/Windows/Microsoft. NET/Framework/v4.0.30319/Temporary ASP. NET Files/root/8f0d007c/83612a6c/EntityFramework. DLL.
Log: download the new URL file: // C:/Windows/Microsoft. NET/Framework/v4.0.30319/Temporary ASP. NET Files/root/8f0d007c/83612a6c/EntityFramework. DLL.
Log: download the new URL file: // D:/SourceProject/chuxing_ver1/trunk/TravelWebApi/bin/EntityFramework. DLL.
Warning: Mismatch occurred when comparing Assembly names: Main version
Error: failed to complete assembly installation (hr = 0x80131040 ). Detection termination.
StackTrace:
In System. Configuration. TypeUtil. GetTypeWithReflectionPermission (IInternalConfigHost host, String typeString, Boolean throwOnError)
In System. Configuration. RuntimeConfigurationRecord. RuntimeConfigurationFactory. Init (RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
In System. Configuration. RuntimeConfigurationRecord. RuntimeConfigurationFactory. InitWithRestrictedPermissions (RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
In System. Configuration. RuntimeConfigurationRecord. CreateSectionFactory (FactoryRecord factoryRecord)
In System. Configuration. BaseConfigurationRecord. FindAndEnsureFactoryRecord (String configKey, Boolean & isRootDeclaredHere) InnerException: After ef6 is updated:An exception of the "System. Data. Entity. Core. MetadataException" type occurs in mscorlib. dll, but not in user code.
Other information: the specified architecture is invalid. Error:
Chemapao. ssdl (0152): Error: No entity framework provider with the fixed name "Devart. Data. MySql" found for the ADO. NET provider. Make sure that the provider is registered in the "entityFramework" section of the application configuration file. For more information, see http://go.microsoft.com/fwlink/?LinkId=260882 . Changed to: {"cannot have a fixed name" MySql. data. mySqlClient "ADO. NET provider load the Entity Framework provider type registered in the application configuration file "MySql. data. mySqlClient. mySqlProviderServices, MySql. data. entity. EF6, Version = 6.9.3.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d ". Make sure that the name of the restricted assembly is used and the Assembly is available to running applications. For more information, see http://go.microsoft.com/fwlink/?LinkId=260882 . "} {" An error occurred while creating the configuration section handler for entityFramework: In application configuration, use different provider type names to specify the fixed name "MySql. data. mySqlClient. For each configured provider, the provider type name must be unique. (D: \ SourceProject \ chuxing_ver1 \ trunk \ TravelWebApi \ web. config line 123) "} {" failed to Load file or assembly "MySql. data. entity. EF6, Version = 6.9.3.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d "or one of its dependencies. The Assembly list definition found does not match the Assembly reference. (Exception from HRESULT: 0x80131040) ":" MySql. data. entity. EF6, Version = 6.9.3.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d "} failed to load the file or assembly" MySql. data. entity. EF6, Version = 6.9.8.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d "or one of its dependencies. The Assembly list definition found does not match the Assembly reference. (Exception from HRESULT: 0x80131040)