title: Using WCF Data Services 5.6.0 with Entity Framework 6+
body: <p>I have been trying to get our WCF Data Service to work with the new Entity Framework 6.</p>
  
  <p>I found this <a href="http://blogs.msdn.com/b/astoriateam/archive/2013/10/02/using-wcf-data-services-5-6-0-with-entity-framework-6.aspx" rel="nofollow noreferrer">article</a> which explains a supposedly easy and painless way to fix this issue.</p>
  
  <p>I followed the directions posted exactly. When I first install:</p>
  
  <pre><code>Install-Package Microsoft.OData.EntityFrameworkProvider -Version 1.0.0-alpha1 -Pre
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>Upon researching that it seems that the solution is to upgrade to alpha 2... and to do this use the command:</p>
  
  <pre><code>Install-Package Microsoft.OData.EntityFrameworkProvider -Pre 
  </code></pre>
  
  <p>When I use this command the Package Manager Console spits out two errors:</p>
  
  <blockquote>
    <p>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 &lt;&lt;&lt;&lt; (
        + 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 &lt;&lt;&lt;&lt; (
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException</p>
  </blockquote>
  
  <p>Then I lose the ability to access the <code>Microsoft.OData</code> namespace... basically keeping me from the class that I need to finish the upgrade <code>Microsoft.OData.Service.Providers.EntityFrameworkDataService</code></p>
  
  <p>Any help at all on this issue would be greatly appreciated!</p>