on 2014 Jun 16 6:09 AM
It has been a long time since Entity Framework 6 has been released. Any ideas on when we will finally get a working EF6 Provider? Having to wait for such a trivial thing like porting a working EF5 provider to EF6.* for over half a year is really disappointing.
Request clarification before answering.
UPDATE: There was an additional problem with the EF6 design-first wizard found during further testing. This has now been fixed in 12.0.1.4162 and 16.0.0.2014, see CR #770760. Code-first projects should still work with the current support.
Windows x86/x64 Support Packages (12.0.1 SP 80 and above, 16.0 SP 19 and above) have been released with this update.
In order to build an Entity Framework 6 project with SQL Anywhere:
Install-Package EntityFramework
Modify the project app.config file to include the SQL Anywhere Entity Framework 6 provider. Here’s an example:
<providers> <provider invariantname="iAnywhere.Data.SQLAnywhere" type="iAnywhere.Data.SQLAnywhere.SAProviderServices, iAnywhere.Data.SQLAnywhere.EF6, Version=16.0.0.20144, Culture=neutral, PublicKeyToken=f222fc4333e0d400"/> </providers>
Build the Visual Studio project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW, Windows 12.0.1 and 16.0 EBFs containing the EF6 provider seem to be available for some weeks: - cf. this CR note.
12.0.1.4155 has been published on 2014-09-06
16.0.0.2003 has been published on 2014-09-05
Note: I do not use EF, so I can't tell whether they work as expected, I just noticed the section in the EBF Readme...
================(Build #4142 - Engineering Case #768717)================ The ADO.NET provider now supports Entity Framework 6. A new dll (iAnywhere.Data.SQLAnywhere.EF6.dll) has been added to %SQLANY%\\Assembly\\V4.5 directory. SetupVSPackage still registers the v4.5 dll. To use the new Entity Framework 6 provider, register it in app.config or web.config. ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Volker for highlighting this support. Yes, we do officially now support Entity Framework 6.0.x now with the above CRs and builds.
However, there is one known issue with this support. When using the Model-first designer in EFTools 6.0, it is possible to encounter the following message:
This is a known bug in EF6: "EF Designer cannot load 3rd party provider if a project has not been built"
https://entityframework.codeplex.com/workitem/1869
Building the project for the first time while the EF6 assemblies are present and referenced will resolve the issue, as mentioned in the article above.
FYI: This particular issue has been resolved in EFTools 6.1.2 and higher. See: https://entityframework.codeplex.com/SourceControl/changeset/c76104ccffbff12f182b3280b992eba196c3625...
Now having a clean build should no longer result in the inability to find the provider and the build step listed in my other answer is not required.
I performed all the steps in the above message and STILL had the problem. I finally stumbled on the following fix on another forum (stackoverflow) and wanted to add the fix to this posting in the hope I save some poor soul the the lost time I experienced.
Note: This fix is for version 17. The fix for 12 or 16 would be the same with appropriate references changed.
You must replace the entity framework section in app.config (web.config) with the following (remove blank lines)...
<system.data>
<DbProviderFactories> <clear /> <add name="SQL Anywhere 17 Data Provider" invariant="Sap.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 17" type="Sap.Data.SQLAnywhere.SAFactory, Sap.Data.SQLAnywhere.EF6, Version=17.0.0.10094, Culture=neutral, PublicKeyToken=f222fc4333e0d400" /> </DbProviderFactories>
</system.data>
<entityframework>
<defaultConnectionFactory type="Sap.Data.SQLAnywhere.SAConnectionFactory, Sap.Data.SQLAnywhere.EF6, Version=17.0.0.10094, Culture=neutral, PublicKeyToken=f222fc4333e0d400"> </defaultConnectionFactory> <providers> <provider invariantName="Sap.Data.SQLAnywhere" type="Sap.Data.SQLAnywhere.SAProviderServices, Sap.Data.SQLAnywhere.EF6, Version=17.0.0.10094, Culture=neutral, PublicKeyToken=f222fc4333e0d400" /> </providers>
</entityframework>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
8 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.