A new version of the Visual FoxPro Entity Framework Provider that targets EF6 is available. The purpose of this blog post is to outline what you need to get started using Code First with the EF Power Tools Beta 4.
Getting Started:
- Install the VFP EF Provider Version 1. The Version 1 build is required because the EF Power Tools doesn’t work with the new EF6 classes.
- Install the VFPEntityFrameworkProvider2 NuGet package.
- Run the Reverse Engineer Code First command.
- Change the data source to use the VFP Entity Framework Provider (EF4 & EF5) option.
- A connection string is added to your config file as part of the code generation process. The connection string was generated to target the VFP EF Provider Version 1. You will need to change providerName in the connection string to use VfpEntityFrameworkProvider2 to get Entity Framework to work with the VFP EF Provider Version 2.
- Add Attribute the DbConfigurationTypeAttribute to your DbContext class using the VfpDbConfiguration type.
* Here is a video showing everything mentioned in this post.