Beispiel #1
0
        /// <summary>
        /// 按照用户id查询记录数
        /// </summary>
        /// <param name="userId">分类</param>
        /// <param name="state">-1所有 0待审核 1 已通过 2未通过..</param>
        /// <returns></returns>
        public static async Task <int> SearchArticlesCountByUserId(int userId, int state)
        {
            var par = new DynamicParameters();

            par.Add("@UserId", userId, DbType.Int32);
            par.Add("@State", state, DbType.Int32);
            var result = await DapWrapper.InnerQueryScalarProcAsync <int>(DbConfig.ArticleManagerConnString, "proc_GetArticleCountByUserId", par);

            return(result);
        }