mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-31 15:56:25 +08:00
Add ToArrayAsync
This commit is contained in:
parent
fb09cb7ae3
commit
6506aa7de2
@ -880,6 +880,15 @@ namespace SqlSugar
|
||||
else
|
||||
return null;
|
||||
}
|
||||
public async virtual Task<T[]> ToArrayAsync()
|
||||
{
|
||||
|
||||
var result =await this.ToListAsync();
|
||||
if (result.HasValue())
|
||||
return result.ToArray();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
public virtual string ToJson()
|
||||
{
|
||||
if (IsCache)
|
||||
|
@ -133,6 +133,7 @@ namespace SqlSugar
|
||||
Task<List<Dictionary<string, object>>> ToDictionaryListAsync();
|
||||
|
||||
T[] ToArray();
|
||||
Task<T[]> ToArrayAsync();
|
||||
Task<List<T>> ToListAsync();
|
||||
|
||||
string ToJson();
|
||||
|
Loading…
Reference in New Issue
Block a user