/// <summary> /// 统计 /// </summary> /// <param name="expression"></param> /// <param name="compileSp"></param> /// <returns></returns> public int Count(Expression <Func <TModel, bool> > expression, bool compileSp = false) { DBExtend helper = GetDbHelper(GetType());//避开事务控制,使用新的连接 return(helper.Count <TModel>(expression, compileSp)); }
public static int Count <TItem>(Expression <Func <TItem, bool> > expression) where TItem : TModel, new() { DBExtend helper = dbHelper; return(helper.Count <TItem>(expression)); }