CRUDServiceBaseTEntity, TKey, TInput, TFilterRawExecuteUpdateAsync Method

执行更新实体 Update 语句的方法。

Definition

Namespace: QuickAdmin.Service.CRUD
Assembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.13
C#
protected virtual Task<IServiceResult<int>> RawExecuteUpdateAsync(
	TInput input,
	TEntity entity,
	string[] propertiesToUpdate,
	CancellationToken cancellationToken
)

Parameters

input  TInput
实体输入 DTO。
entity  TEntity
要更新的实体。
propertiesToUpdate  string
指示要更新哪些属性。
cancellationToken  CancellationToken
用于取消操作的令牌。

Return Value

TaskIServiceResultint
服务调用结果。若成功,其数据为影响的行数。

Remarks

即具体执行更新操作的方法,供 UpdateAsync(TKey, TInput, string, CancellationToken) 方法调用,若需要事务,请在派生类重写。

基类此方法内调用了 GetIUpdateAsync(TEntity, string, CancellationToken) 取得 IUpdate 并执行之。

See Also