Add a reference to the Entity Framework 6 provider assembly (VistaDB.6.Entity.6.dll). For more information on the various VistaDB assemblies and their roles see Deploying VistaDB with your Application.
When upgrading from Entity Framework 4.0 or 5.0 to a later version you need to also switch the VistaDB Entity Framework Provider to the correct version. Visual Studio relies on having the correct provider information in the app.config file for the assembly where the Entity Model (.edmx) file is as well as the provider assembly or it will not start the visual designer or let you do model updates. Therefore the sequence is important:
Add a reference to the Entity Framework 6 provider assembly (VistaDB.6.Entity.6.dll). For more information on the various VistaDB assemblies and their roles see Deploying VistaDB with your Application.
Using the NuGet Package manager, upgrade to Entity Framework 6 (or the latest version). Do not perform extra steps for migrating to EF 6 such as changing the code generation model yet.
After you have updated Entity Framework follow Microsoft's instructions for upgrading your application project, stopping before upgrading the project's code generation templates.
An additional entry is required to register the VistaDB Entity Framework Provider for EF 6 to find it. Add the following section to the configuration file:
App.Config or Web.Config File |
Copy Code
|
---|---|
<?xml version="1.0" encoding="utf-8"?> <configuration> <entityFramework> <providers> <provider invariantName="System.Data.VistaDB6" type="VistaDB.Entity.VistaDBProviderServices, VistaDB.6.Entity.6" /> </providers> </entityFramework> </configuration |
When Entity Framework 6 was added it will have added additional entries. For a more complete picture on what the final configuration file needs to include see Using VistaDB with Entity Framework - Registering the Provider.
Before you can complete the EF 6 upgrade process and use the designer you need to build the assembly. This ensures that the updated app.config file, Entity Framework assemblies, and VistaDB provider assembly are all located in your output binary directory. Visual Studio checks here for these specific items to enable the Entity Framework tooling to use third party providers.