내 프로젝트에서 MySQL과 함께 Entity Framework를 사용합니다. 이 코드 : 같은 스택 추적과 System.ArgumentNullException: Value cannot be null. Parameter name: key
엔티티 프레임 워크 : 값은 null 일 수 없습니다. 매개 변수 이름 : 키
:
objectContext.users.Include("posts").Take(2).ToList()
예외가 발생 objectContext.users.Take(2).ToList()
또는 objectContext.users.Include("posts").ToList()
잘 작동하는지 흥미
[ArgumentNullException: Value cannot be null.
Parameter name: key]
System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +12670485
MySql.Data.Entity.Scope.GetFragment(String name) +27
MySql.Data.Entity.SelectStatement.AddDefaultColumns(Scope scope) +177
MySql.Data.Entity.SelectStatement.Wrap(Scope scope) +90
MySql.Data.Entity.SelectGenerator.WrapJoinInputIfNecessary(InputFragment fragment, Boolean isRightPart) +251
MySql.Data.Entity.SelectGenerator.HandleJoinExpression(DbExpressionBinding left, DbExpressionBinding right, DbExpressionKind joinType, DbExpression joinCondition) +110
MySql.Data.Entity.SelectGenerator.Visit(DbJoinExpression expression) +33
MySql.Data.Entity.SqlGenerator.VisitInputExpression(DbExpression e, String name, TypeUsage type) +50
MySql.Data.Entity.SelectGenerator.VisitInputExpressionEnsureSelect(DbExpression e, String name, TypeUsage type) +19
MySql.Data.Entity.SelectGenerator.Visit(DbProjectExpression expression) +45
MySql.Data.Entity.SqlGenerator.VisitInputExpression(DbExpression e, String name, TypeUsage type) +50
MySql.Data.Entity.SelectGenerator.VisitInputExpressionEnsureSelect(DbExpression e, String name, TypeUsage type) +19
MySql.Data.Entity.SelectGenerator.Visit(DbSortExpression expression) +61
MySql.Data.Entity.SqlGenerator.VisitInputExpression(DbExpression e, String name, TypeUsage type) +50
MySql.Data.Entity.SelectGenerator.VisitInputExpressionEnsureSelect(DbExpression e, String name, TypeUsage type) +19
MySql.Data.Entity.SelectGenerator.Visit(DbProjectExpression expression) +45
MySql.Data.Entity.SelectGenerator.GenerateSQL(DbCommandTree tree) +73
MySql.Data.MySqlClient.MySqlProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree) +401
System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree) +608
.
누구든지이 문제가 발생했습니다.