mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Update SimpleClient
This commit is contained in:
@@ -37,6 +37,10 @@ namespace SqlSugar
|
||||
bool InsertRange(T[] insertObjs);
|
||||
int InsertReturnIdentity(T insertObj);
|
||||
long InsertReturnBigIdentity(T insertObj);
|
||||
long InsertReturnSnowflakeId(T insertObj);
|
||||
List<long> InsertReturnSnowflakeId(List<T> insertObjs);
|
||||
|
||||
|
||||
bool IsAny(Expression<Func<T, bool>> whereExpression);
|
||||
bool Update(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression);
|
||||
bool Update(T updateObj);
|
||||
@@ -64,6 +68,9 @@ namespace SqlSugar
|
||||
Task<bool> InsertRangeAsync(T[] insertObjs);
|
||||
Task<int> InsertReturnIdentityAsync(T insertObj);
|
||||
Task<long> InsertReturnBigIdentityAsync(T insertObj);
|
||||
Task<long> InsertReturnSnowflakeIdAsync(T insertObj);
|
||||
Task<List<long>> InsertReturnSnowflakeIdAsync(List<T> insertObjs);
|
||||
|
||||
Task<bool> IsAnyAsync(Expression<Func<T, bool>> whereExpression);
|
||||
Task<bool> UpdateAsync(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression);
|
||||
Task<bool> UpdateAsync(T updateObj);
|
||||
|
@@ -148,6 +148,22 @@ namespace SqlSugar
|
||||
{
|
||||
return this.Context.Insertable(insertObj).ExecuteReturnBigIdentity();
|
||||
}
|
||||
public virtual long InsertReturnSnowflakeId(T insertObj)
|
||||
{
|
||||
return this.Context.Insertable(insertObj).ExecuteReturnSnowflakeId();
|
||||
}
|
||||
public virtual List<long> InsertReturnSnowflakeId(List<T> insertObjs)
|
||||
{
|
||||
return this.Context.Insertable(insertObjs).ExecuteReturnSnowflakeIdList();
|
||||
}
|
||||
public virtual Task<long> InsertReturnSnowflakeIdAsync(T insertObj)
|
||||
{
|
||||
return this.Context.Insertable(insertObj).ExecuteReturnSnowflakeIdAsync();
|
||||
}
|
||||
public virtual Task<List<long>> InsertReturnSnowflakeIdAsync(List<T> insertObjs)
|
||||
{
|
||||
return this.Context.Insertable(insertObjs).ExecuteReturnSnowflakeIdListAsync();
|
||||
}
|
||||
public virtual bool InsertRange(T[] insertObjs)
|
||||
{
|
||||
return this.Context.Insertable(insertObjs).ExecuteCommand() > 0;
|
||||
|
Reference in New Issue
Block a user