Optimized code

This commit is contained in:
sunkaixuan 2024-02-24 16:13:54 +08:00
parent b8b6f03466
commit 084562c290

View File

@ -131,7 +131,7 @@ namespace SqlSugar
public async Task<bool> AnyAsync() public async Task<bool> AnyAsync()
{ {
return await this.CountAsync() > 0; return (await this.Take(1).Select("1").ToListAsync()).Count() > 0; ;
} }
public Task<int> CountAsync(CancellationToken token) public Task<int> CountAsync(CancellationToken token)