Closed EricHurt closed 3 years ago
Hello @Wheater ,
Do you think you could provide a runnable project sample for this issue? It will help my developer to get started to investigate it faster and make sure nothing is missing.
Providing a project sample is now REQUIRED. It happened too many times that something was missing to investigate and/or answer an issue.
Try to create a new project with only the minimal code (having too many non-related codes doesn’t help either).
You can send it to info@zzzprojects.com if you need to keep the source private
Best Regards,
Jon
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
@JonathanMagnan Honestly, I don't think it's feasible at this point and I have too many deadlines to meet. Maybe I can revisit this in the future.
No problem,
Just let us know whenever you can provide an example and we will re-open the issue.
Best Regards,
Jon
Description
After saving changes in the context, querying them causes an exception with the following error. I cannot call FirstOrDefault, Where, ToList, etc. etc.
_context.Table.Find seems to work, but that is the only method of querying the context available.
Exception
System.Data.Entity.Core.EntityCommandExecutionException : An error occurred while executing the command definition. See the inner exception for details. ---- System.ArgumentNullException : Value cannot be null. Parameter name: sql Stack Trace: EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues) <>cDisplayClass7.b 6()
ObjectContext.ExecuteInTransaction[T](Func.GetEnumerator>b0()
LazyEnumeratorb 1[TResult](IEnumerable
1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) <>c__DisplayClass7.<GetResults>b__5() DefaultExecutionStrategy.Execute[TResult](Func
1 operation) ObjectQuery1.GetResults(Nullable
1 forMergeOption) IEnumerable1.MoveNext() Enumerable.FirstOrDefault[TSource](IEnumerable
1 source) ObjectQueryProvider.1 sequence) ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable
1 query, Expression queryRoot) IQueryProvider.Execute[TResult](Expression expression) DbQueryProvider.Execute[TResult](Expression expression) Queryable.FirstOrDefault[TSource](IQueryable1 source) SettingsMarketingToolsRepositoryTests.SomeTest() line 32 ----- Inner Stack Trace ----- QueryRegistrar.ContainsQuery(MetadataWorkspace workspace, String sql) CachingCommand.get_IsQueryAlwaysCached() CachingCommand.get_IsCacheable() CachingCommand.ExecuteDbDataReader(CommandBehavior behavior) DbCommand.ExecuteReader(CommandBehavior behavior) DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext
1 c) InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func
3 operation, TInterceptionContext interceptionContext, Action3 executing, Action
3 executed) DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior) DbCommand.ExecuteReader(CommandBehavior behavior) EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)Note: If you are not able to provide code we can run and that reproduce the issue, we will not be able to fix it either.
Example
Further technical details