UserServiceRawExecuteInsertAsync Method

执行插入实体 Insert 语句的方法。

Definition

Namespace: QuickAdmin.Service.Admin
Assembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 1.2.33
C#
protected override Task RawExecuteInsertAsync(
	SysUser entity
)

Parameters

entity  SysUser
要插入的实体。此实体对象通常是由 TInput 映射而来的。

Return Value

Task

Remarks

方法内调用 GetIInsertAsync(TEntity) 取得 IInsert 并执行之。
对于 IEntityWithAutoIdKey 类型实体以及 IEntityWithIdKey<int> 类型且标注了主键 IsIdentity=true 的实体, 执行 ExecuteIdentity() 并将返回值赋予实体 Id 属性。
对于其它类型实体,执行 ExecuteAffrows()

See Also