-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexOutOfRangeException in CreateNavigationExpansionExpression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version #30115
Comments
This issue is lacking enough information for us to be able to fully understand what is happening. Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate. |
Sorry, i am cannot do it. I am used code generation in large application. In 6.x version all works. After upgrating to 7.0.2 ia get this exception. my EF Core class named ''<>f__AnonymousType01Child". Now i am did EF Core class named ''f__AnonymousType01Child" and all ok. I.e. enough remove <> as first symbols |
@P9avel We can't help here without enough information to understand what is going on. You will need to attempt to strip down your code to create a runnable repro. |
As @ajcvickers wrote, just posting an exception stack trace is very rarely enough. You'll need to provide us with the necessary information to allow us to reproduce the problem. |
Hello. I see you, am try creating small example |
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it. BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions. |
The problem is here:
ShortName property return empty string
|
Note from triage: @maumar to investigate. |
…Expression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version Check if ShortName returns empty string, and if so use token parameter name. Fixes #30115
…Expression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version Adjusting ShortName to trim "<>" from the start of the type name. Fixes #30115
…Expression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version Adjusting ShortName to trim "<>" from the start of the type name. Fixes #30115
reopen for potential servicing |
…Expression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version Adjusting ShortName to trim "<>" from the start of the type name. Fixes #30115
…Expression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version Adjusting ShortName to trim "<>" from the start of the type name. Fixes #30115
When you planning build 7.0.6 ? |
@P9avel Second Tuesday of June |
Hi, i am recived
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.String.get_Chars(Int32 index)
at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.CreateNavigationExpansionExpression(Expression sourceExpression, IEntityType entityType)
at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.VisitExtension(Expression extensionExpression)
at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.Expand(Expression query)
at Microsoft.EntityFrameworkCore.Query.QueryTranslationPreprocessor.Process(Expression query)
at Microsoft.EntcityFrameworkCore.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 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
when my EF Core class named '' "<>f__AnonymousType01Child" in 7.0.2
I am think issue in ShortName() implementation
The text was updated successfully, but these errors were encountered: