-
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
Cannot access property through interface in ExecuteUpdate setter lambda #29618
Comments
You need to share a runnable code sample |
im push new code for code sample |
This is because of the access of the property through the interface in the SetProperty key lambda: If you replace your extension method: public static Task<int> LogicDeleteAsync<T>(this IQueryable<T> queryable) where T:ILogicDelete
{
return queryable.ExecuteUpdateAsync(o => o.SetProperty(p => p.IsDelete, p => true));
} ... with a non-generic version: public static Task<int> LogicDeleteAsync2(this IQueryable<LogicDatabaseEntity> queryable)
{
return queryable.ExecuteUpdateAsync(o => o.SetProperty(p => p.IsDelete, p => true));
} ... then everything works. Flagging as a bug. |
@roji yes support generic is importment for project,it make code robust |
Referencing unowned properties only for now. Fixes dotnet#29618
Clearing milestone to discuss patching |
…ter property lambda (dotnet#29672) Fixes dotnet#29618 Fixes dotnet#28727 (cherry picked from commit d4be66b)
lib
code
error
The text was updated successfully, but these errors were encountered: