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))); }
public static int GetCount(string sql) { return(Convert.ToInt32(DBHelp.ExecuteObject(sql))); }