I have been trying to get our WCF Data Service to work with the new Entity Framework 6.
I found this article which explains a supposedly easy and painless way to fix this issue.
I followed the directions posted exactly. When I first install:
Install-Package Microsoft.OData.EntityFrameworkProvider -Version 1.0.0-alpha1 -Pre
I get the error:
Error 16 The type 'Microsoft.OData.Service.DataService`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.OData.Service, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. C:\Realtime Source\RTR 6.x\RTRServices\RTRWCFDataService\RTRWCFDataService\RTRWCFData.svc.cs 21 16 RTRWCFDataService
Upon researching that it seems that the solution is to upgrade to alpha 2... and to do this use the command:
Install-Package Microsoft.OData.EntityFrameworkProvider -Pre
When I use this command the Package Manager Console spits out two errors:
Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not load type 'System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand' from assembly 'E ntityFramework.PowerShell, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'." At C:\Realtime Source\RTR 6.x\RTRServices\RTRWCFDataService\packages\EntityFramework.6.0.1\tools\EntityFramework.psm1:698 char:31 + $domain.CreateInstanceFrom <<<< ( + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not load type 'System.Data.Entity.ConnectionFactoryConfig.AddProviderCommand' from assembly 'EntityFramework .PowerShell, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'." At C:\Realtime Source\RTR 6.x\RTRServices\RTRWCFDataService\packages\EntityFramework.6.0.1\tools\EntityFramework.psm1:698 char:31 + $domain.CreateInstanceFrom <<<< ( + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException
Then I lose the ability to access the Microsoft.OData
namespace... basically keeping me from the class that I need to finish the upgrade Microsoft.OData.Service.Providers.EntityFrameworkDataService
Any help at all on this issue would be greatly appreciated!