CRUDServiceBaseTEntity, TKey, TInput, TFilterRawExecuteInsertAsync Method
执行插入实体 Insert 语句的方法。
即具体执行插入操作的方法,供
AddAsync(TInput, CancellationToken) 方法调用,若需要事务,请在派生类重写。
基类此方法内:
对于
IEntityWithAutoIdKey 类型实体以及
IEntityWithIdKey<int> 类型且标注了主键 IsIdentity=true 的实体,
执行
ExecuteIdentity() 并将返回值赋予实体
Id 属性。
对于其它类型实体,执行
ExecuteAffrows()。