ICRUDServiceTEntity, TKey, TInput, TFilterUpdateAsync Method
更新实体。
Namespace: QuickAdmin.Service.CRUDAssembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.13
Task<IServiceResult<int>> UpdateAsync(
TKey id,
TInput input,
string[] propertiesToUpdate = null,
CancellationToken cancellationToken = default
)
- id TKey
- 主键值。
- input TInput
- 实体输入 DTO。
- propertiesToUpdate string (Optional)
- 指示要更新哪些属性。不提供表示更新所有可更新的属性。
- cancellationToken CancellationToken (Optional)
- 用于取消操作的令牌。
TaskIServiceResultint服务调用结果。若成功,其数据为影响的行数。