I have this method:
我有这样一个方法:
public async Task<int> RemoveClassify(RemoveClassifyVm vm)
{
return await _db.UserAccesses
.Where(UserAccess => vm.userAccessIds.Any(userAccessId => userAccessId == UserAccess.Id))
.ExecuteUpdateAsync(UserAccess => UserAccess
.SetProperty(UserAccess => UserAccess.ClassId, null)
);
}
but get error : Error CS0121 The call is ambiguous between the following methods or properties: 'SetPropertyCalls.SetProperty(Func<TSource, TProperty>, Func<TSource, TProperty>)' and 'SetPropertyCalls.SetProperty(Func<TSource, TProperty>, TProperty)'
但Get Error:Error CS0121该调用在以下方法或属性之间不明确:‘SetPropertyCalls.SetProperty(Func
,Func
)’和‘SetPropertyCalls.SetProperty(Func
,TProperty)’
更多回答
优秀答案推荐
we must use : SetProperty(UserAccess => UserAccess.ClassId, (int?)null)
必须使用:SetProperty(UserAccess=>UserAccess.ClassID,(int?)NULL)
Use this:
使用以下命令:
SetProperty(UserAccess => UserAccess.ClassId, UserAccess => null)
更多回答
我是一名优秀的程序员,十分优秀!