|
|
|
@ -18,6 +18,16 @@ public class RepositoryBase<T>(ISqlSugarClient context) : IRepositoryBase<T> whe
|
|
|
|
|
return await context.Insertable<T>(entity).ExecuteReturnSnowflakeIdAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<T> AddAsync(T entity)
|
|
|
|
|
{
|
|
|
|
|
return await context.Insertable<T>(entity).ExecuteReturnEntityAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<List<T>> AddRangeAsync(IList<T> entities)
|
|
|
|
|
{
|
|
|
|
|
return await context.Insertable<T>(entities).ExecuteReturnPkListAsync<T>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<IList<long>> AddSnowflakesAsync(IList<T> entities)
|
|
|
|
|
{
|
|
|
|
|
return await context.Insertable<T>(entities).ExecuteReturnSnowflakeIdListAsync();
|
|
|
|
|