mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Optimized code
This commit is contained in:
parent
4ebb372efd
commit
cf6d6e9c17
@ -27,6 +27,10 @@ namespace SqlSugar
|
||||
|
||||
public virtual async Task<T> InSingleAsync(object pkValue)
|
||||
{
|
||||
if (pkValue == null)
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
Check.Exception(this.QueryBuilder.SelectValue.HasValue(), "'InSingle' and' Select' can't be used together,You can use .Select(it=>...).Single(it.id==1)");
|
||||
var list = await In(pkValue).ToListAsync();
|
||||
if (list == null) return default(T);
|
||||
|
Loading…
Reference in New Issue
Block a user