You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EF Core version: 5.0.11
Database provider: Microsoft.EntityFrameworkCore.InMemory 5.0.9
Target framework: (e.g. dotnet core 3.1)
Operating system: windows 7
IDE: (e.g. Visual Studio 2019 16.3)
I am seeing the following exception on All my many to many entity relationships.
Our Schema is large and was revved up from EF6 to EFCore in late 2020. the many to many relationships work correctly when accessing a SQL database in MSSQL 2019
the exception does not occur and x.Children is not null and has the correct entries.
This is only effecting our unit test development.
Exception:
System.InvalidCastException
HResult=0x80004002
Message=Unable to cast object of type 'System.Linq.Expressions.NewExpression' to type 'System.Linq.Expressions.MethodCallExpression'.
Source=Microsoft.EntityFrameworkCore.InMemory
StackTrace:
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryQueryExpression.AddSubqueryProjection(ShapedQueryExpression shapedQueryExpression, Expression& innerShaper)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.Visit(Expression expression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.VisitNew(NewExpression newExpression)
at System.Linq.Expressions.NewExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.Visit(Expression expression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.Translate(InMemoryQueryExpression queryExpression, Expression expression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryQueryableMethodTranslatingExpressionVisitor.TranslateSelect(ShapedQueryExpression source, LambdaExpression selector)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_01.<Execute>b__0() at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable1.GetEnumerator() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at ABSolute.Core.Module.DealManagement.DataServices.Test.FundingCommitmentBrowser.FundingCommitmentBrowserDataServiceTest.FundingCommitmentBrowserDataService_LoadConduits() in I:\Development\DEv3\CoreServer\Modules\Tests\ABSolute.Core.Module.DealManagement.DataServices.Test\FundingCommitmentBrowser\FundingCommitmentBrowserDataServiceTest.cs:line 33
Your Assistance is Appreciated.
The text was updated successfully, but these errors were encountered:
@ajcvickers I will try to rev forward to EF Core 6, I must first rev my entire project to net 5.0, we are currently on Core 3.1.
Is EF Core 5.x closed or might the in memory provider fix percolate down?
EF Core version: 5.0.11
Database provider: Microsoft.EntityFrameworkCore.InMemory 5.0.9
Target framework: (e.g. dotnet core 3.1)
Operating system: windows 7
IDE: (e.g. Visual Studio 2019 16.3)
I am seeing the following exception on All my many to many entity relationships.
Our Schema is large and was revved up from EF6 to EFCore in late 2020. the many to many relationships work correctly when accessing a SQL database in MSSQL 2019
This is caused but this call
where Parent and Children have a Many to Many relationship.
when run as
the exception does not occur and
x.Children
is not null and has the correct entries.This is only effecting our unit test development.
Exception:
System.InvalidCastException
HResult=0x80004002
Message=Unable to cast object of type 'System.Linq.Expressions.NewExpression' to type 'System.Linq.Expressions.MethodCallExpression'.
Source=Microsoft.EntityFrameworkCore.InMemory
StackTrace:
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryQueryExpression.AddSubqueryProjection(ShapedQueryExpression shapedQueryExpression, Expression& innerShaper)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.Visit(Expression expression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.VisitNew(NewExpression newExpression)
at System.Linq.Expressions.NewExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.Visit(Expression expression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryProjectionBindingExpressionVisitor.Translate(InMemoryQueryExpression queryExpression, Expression expression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryQueryableMethodTranslatingExpressionVisitor.TranslateSelect(ShapedQueryExpression source, LambdaExpression selector)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.InMemory.Query.Internal.InMemoryQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0
1.<Execute>b__0() at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func
1 compiler)at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable
1.GetEnumerator() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)at ABSolute.Core.Module.DealManagement.DataServices.Test.FundingCommitmentBrowser.FundingCommitmentBrowserDataServiceTest.FundingCommitmentBrowserDataService_LoadConduits() in I:\Development\DEv3\CoreServer\Modules\Tests\ABSolute.Core.Module.DealManagement.DataServices.Test\FundingCommitmentBrowser\FundingCommitmentBrowserDataServiceTest.cs:line 33
Your Assistance is Appreciated.
The text was updated successfully, but these errors were encountered: