示例#1
0
        public static int GetCount <T>() where T : ModelBase
        {
            Type   t         = typeof(T);
            string tableName = t.Name;
            string sql       = "select count(*) from " + tableName + "";

            return(Convert.ToInt32(DBHelp.ExecuteObject(sql)));
        }
示例#2
0
 public static int GetCount(string sql)
 {
     return(Convert.ToInt32(DBHelp.ExecuteObject(sql)));
 }