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
warn: 8/30/2022 18:22:48.438 RelationalEventId.QueryPossibleUnintendedUseOfEqualsWarning[20501] (Microsoft.EntityFrameworkCore.Query)
Possible unintended use of method 'Equals' for arguments 'p.PublishedOn' and 'DEFAULT' of different types in a query. This comparison will always return false.
Unhandled exception. System.InvalidOperationException: The LINQ expression 'DbSet<FeaturedPost>()
.ExecuteUpdate(setPropertyCalls => setPropertyCalls.SetProperty<DateTime>(
propertyExpression: post => post.PublishedOn,
valueExpression: post => EF.Default<DateTime>()))' could not be translated. Additional information: The following 'SetProperty' failed to translate: 'SetProperty(post => post.PublishedOn, post => EF.Default<DateTime>())'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.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__DisplayClass12_0`1.<ExecuteAsync>b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.ExecuteUpdateAsync[TSource](IQueryable`1 source, Expression`1 setPropertyCalls, CancellationToken cancellationToken)
at NewInEfCore7.ExecuteUpdateSample.ResetPostPublishedOnToDefault[TContext]() in C:\github\EntityFramework.Docs\samples\core\Miscellaneous\NewInEFCore7\ExecuteUpdateSample.cs:line 182
at NewInEfCore7.ExecuteUpdateSample.ResetPostPublishedOnToDefault[TContext]() in C:\github\EntityFramework.Docs\samples\core\Miscellaneous\NewInEFCore7\ExecuteUpdateSample.cs:line 191
at NewInEfCore7.ExecuteUpdateSample.ExecuteUpdateTest[TContext]() in C:\github\EntityFramework.Docs\samples\core\Miscellaneous\NewInEFCore7\ExecuteUpdateSample.cs:line 59
at NewInEfCore7.ExecuteUpdateSample.ExecuteUpdateTest[TContext]() in C:\github\EntityFramework.Docs\samples\core\Miscellaneous\NewInEFCore7\ExecuteUpdateSample.cs:line 61
at Program.Main() in C:\github\EntityFramework.Docs\samples\core\Miscellaneous\NewInEFCore7\Program.cs:line 18
at Program.<Main>()
The text was updated successfully, but these errors were encountered:
See #28921
The text was updated successfully, but these errors were encountered: