mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add QueryableByObject.Count
This commit is contained in:
parent
e85c72935c
commit
e8ce80a482
@ -323,7 +323,12 @@ namespace SqlSugar
|
||||
var reslt = method.Invoke(QueryableObj, new object[] { });
|
||||
return Convert.ToBoolean(reslt);
|
||||
}
|
||||
|
||||
public int Count()
|
||||
{
|
||||
var method = QueryableObj.GetType().GetMyMethod("Count", 0);
|
||||
var reslt = method.Invoke(QueryableObj, new object[] { });
|
||||
return Convert.ToInt32(reslt);
|
||||
}
|
||||
public object ToTree(string childPropertyName, string parentIdPropertyName, object rootValue, string primaryKeyPropertyName)
|
||||
{
|
||||
var method = QueryableObj.GetType().GetMyMethod("ToTree", 4,typeof(string),typeof(string),typeof(object),typeof(string));
|
||||
@ -379,6 +384,12 @@ namespace SqlSugar
|
||||
var reslt = method.Invoke(QueryableObj, new object[] { });
|
||||
return await (Task<bool>) reslt;
|
||||
}
|
||||
public async Task<int> CountAsync()
|
||||
{
|
||||
var method = QueryableObj.GetType().GetMyMethod("CountAsync", 0);
|
||||
var reslt = method.Invoke(QueryableObj, new object[] { });
|
||||
return await (Task<int>)reslt;
|
||||
}
|
||||
public async Task<object> InSingleAsync(object pkValue)
|
||||
{
|
||||
var method = QueryableObj.GetType().GetMyMethod("InSingleAsync", 1);
|
||||
|
Loading…
Reference in New Issue
Block a user