I finally got EF 6 to work!. the problem turned out that the class EntityConnection was moved from namespace System.Data.EntityClient to System.Data.Entity.Core.EntityClient. I was using the wrong connection.
I've tried several things and can't get passed this error or when I do, I get "he context is being used in Code First mode with code that was generated from an EDMX file for Database First". So I'm giving up and going back to EF 5.
Thanks for all you help even if it didn't in success.
Did you find the help installed with VistaDB 5? (I think it's the file: VistaDB.chm You should be able to open it directly.) The instructions for upgrading to EF6 are in Getting Started->Using VistaDB with Entity Framework->Upgrading to Entity Framework 6. (It also seems to be linked directly under Getting Started->Upgrading to Entity Framework 6.)
This also has a link to "Microsoft's instructions for upgrading your application project" (for EF6) and a link to another help page: Getting Started->Using VistaDB with Entity Framework->Registering the Provider which has an example of additional config entries for EF6 (and separately for EF4-5). The example includes an example connection string config naming the provider--which your app.config does not seem to have. Given the error, that identification seems to be what it's missing. How is your app specifying the connection string to Entity Framework so that it knows what provider and provider connection string to use? Also, double-check Microsoft's instructions for anything you might have missed.
I make the change I still get the same error. The Vista DB 5 make no mention of entity framework.
Ah, I may have found what's wrong. You may have followed the Upgrading-to-EF6 directions for VistaDB 6 (found at: https://doc.vistadb.com/EntityFramework_UpgradingTo6.html ) and just changed VistaDB.6 to VistaDB.5. This may be mostly correct, but checking the EF6 upgrade instructions in the VistaDB 5 help specifically (which should be installed with VistaDB 5) there is a key difference in the name of the assembly you need to specify in your app.config.
For VistaDB 5 the example is:
<?xml version="1.0" encoding="utf-8"?> <configuration> <entityFramework> <providers> <provider invariantName="System.Data.VistaDB5" type="VistaDB.Entity.VistaDBProviderServices, VistaDB.5.Entity.6.NET40" /> </providers> </entityFramework> </configuration>
VistaDB 6 no longer has the .NET40 distinguisher (different targets are now handled by NuGet without different naming), so the VistaDB 6 example doesn't have that portion of the name which would be needed for the VistaDB 5 provider assembly. Your app.config has the entry, but is missing .NET40 from the assembly name in the type for it.
Fix that entry and double-check the specific instructions in the VistaDB 5 help, and you can hopefully get it working.
I'm trying to upgrade Entity Framework 5 to 6 using Vista DB 5. I first switched reference from VistaDB.5.Entity.4.NET40.dll to VistaDB.5.Entity.6.NET40.dll then upgraded Entity Framework 5 to Entity Framework 6.4.0. When I ran the app i get error "Unable to determine the provider name for provider ". I don't understand why since I did not change the provider. Its still System.Data.VistaDB5. Attached is my config file.