// public int Count(Person whereModel, string where) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(*) from [Person] "); strSql.AppendFormat("where 1=1 and {0} ", where); var result = DbHelperSql.Count(strSql.ToString(), whereModel); return(result); }