/// <summary> /// 查询数目 /// </summary> /// <param name="lstScope">条件</param> /// <returns></returns> public static long SelectCount <T>(ScopeList lstScope) where T : EntityBase, new() { string name = typeof(T).FullName; BusinessModelBase <T> bo = DataAccessLoader.GetBoInstance(name) as BusinessModelBase <T>; if (bo == null) { throw new MissingMemberException("找不到:" + name + " 对应的业务类"); } return(bo.SelectCount(lstScope)); }
/// <summary> /// 查询数目 /// </summary> /// <param name="condition"></param> /// <param name="entityType"></param> /// <returns></returns> public static long SelectCount <T>(BQLCondition condition) where T : EntityBase, new() { string name = typeof(T).FullName; BusinessModelBase <T> bo = DataAccessLoader.GetBoInstance(name) as BusinessModelBase <T>; if (bo == null) { throw new MissingMemberException("找不到:" + name + " 对应的业务类"); } ScopeList lstScope = new ScopeList(); if (!CommonMethods.IsNull(condition)) { lstScope.Add(condition); } return(bo.SelectCount(lstScope)); }