Exception with EF 5
I am getting the following Exception using an EF 5 connection:
Method not found: 'Microsoft.EntityFrameworkCore.Query.Internal.IAsyncQueryProvider Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.get_QueryProvider()'.
My query works fine with EF 3.1.
The exception occurs at the end of the query - the last operation are two Dump
s of the same data, one with true
and one without. The data is empty but no empty grid shows up. The empty Object explorer (0 items)
does show up. Commenting out the Dump
with true
it seems like that is causing the exception. The query object being dumped doesn't have any EF queries in it - it has been instantiated using ToHashSet
into a variable.
This is in LINQPad 6.11.8 (X64).
Host runtime version: 3.1.8
Default query runtime version: 3.1.8
Default query reference assembly version: 3.1.0
Roslyn Version: 3.8.0-4.20503.2
FSharp.Compiler.Service version: 22.0.3.0
NuGet client version: 5.6.0.5
Exception Details:
TargetSite: EFHelper.CreateSaveChangesAdapter (Type elementType, Object dataSource, Object elementSample, Object parent)
StackTrace:
at LINQPad.Drivers.EFCore.EFHelper.CreateSaveChangesAdapter(Type elementType, Object dataSource, Object elementSample, Object parent)
at LINQPad.Drivers.EFCore.DynamicDriver.CreateSaveChangesAdapter(Type elementType, Object dataSource, Object elementSample, Object parent)
at LINQPad.UI.ExplorerGrid.Populate()
at LINQPad.UI.ExplorerGrid.UpdateDataSourceToUse()
at LINQPad.UI.ExplorerGrid.set_CustomDataSource(Object value)
at LINQPad.UI.ExplorerGrid.Display(Object o, GridOptions options)
at LINQPad.UI.RuntimeUIServices.DisplayInGrid(Object obj, GridOptions options)
at LINQPad.Extensibility.DataContext.DataContextDriver.DisplayObjectInGrid(Object objectToDisplay, GridOptions options)
at LINQPad.Extensions.<>c__DisplayClass22_0`1.b__0()
Source:
LINQPad.Drivers.EFCore
HResult: -2146233069
Comments
In another, similar query, attempting to use EF 5, I don't have a grid dump setup. When I attempted to use View in Grid on one of the results, I got the same exception.
Thanks - I'll get a fix out shortly.