mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Code optimization
This commit is contained in:
@@ -578,7 +578,7 @@ namespace SqlSugar
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
else if (result.Count == 2)
|
||||
else if (result.Count >= 2)
|
||||
{
|
||||
Check.Exception(true,ErrorMessage.GetThrowMessage(".Single() result must not exceed one . You can use.First()","使用single查询结果集不能大于1,适合主键查询,如果大于1你可以使用Queryable.First"));
|
||||
return default(T);
|
||||
|
Reference in New Issue
Block a user