Ejemplo n.º 1
0
        /// <summary>
        /// 删除所有符合条件的评论记录
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns></returns>
        public async Task <int> DelManyUserCommAsync(UserCommQuery query)
        {
            try
            {
                if (query == null)
                {
                    _log.Error("query is not null");
                    return(-1);
                }
                var express = BuildQuery(query);
                if (express == null)
                {
                    _log.Error("query's attribute is not null");
                    return(-1);
                }

                return(await _mongoRespository.DelManayAsync(express));
            }
            catch (Exception ex)
            {
                _log.Error("DelManyUserCommAsync method error:" + ex);
                throw;
            }
        }