コード例 #1
0
 /// <summary>
 /// 批量删除
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public BulkDeleteAdsResponse BulkDeleteAds(BulkDeleteAdsRequest request)
 {
     using (var client = DbFactory.GetClient())
     {
         client.Deleteable <Ad>().In(request.Ids).ExecuteCommand();
         _eventPublisher.EntitiesDeleted <Ad>(request.Ids);
         return(new BulkDeleteAdsResponse());
     }
 }
コード例 #2
0
ファイル: AdService.cs プロジェクト: zyptfy/moz
 /// <summary>
 /// 批量删除
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ServResult BulkDeleteAds(ServRequest <BulkDeleteAdsDto> request)
 {
     using (var client = DbFactory.GetClient())
     {
         client.Deleteable <Ad>().In(request.Data.Ids).ExecuteCommand();
         _eventPublisher.EntitiesDeleted <Ad>(request.Data.Ids);
         return(Ok());
     }
 }
コード例 #3
0
ファイル: AdService.cs プロジェクト: zangyx/moz
 /// <summary>
 /// 批量删除
 /// </summary>
 /// <param name="dto"></param>
 /// <returns></returns>
 public PublicResult BulkDeleteAds(BulkDeleteAdsDto dto)
 {
     using (var client = DbFactory.CreateClient())
     {
         client.Deleteable <Ad>().In(dto.Ids).ExecuteCommand();
         _eventPublisher.EntitiesDeleted <Ad>(dto.Ids);
         return(Ok());
     }
 }
コード例 #4
0
ファイル: ArticleService.cs プロジェクト: zangyx/moz
        /// <summary>
        ///
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public BulkDeleteArticlesResponse BulkDeleteArticles(BulkDeleteArticlesRequest request)
        {
            using (var client = DbFactory.CreateClient())
            {
                client.Deleteable <Article>().In(request.Ids).ExecuteCommand();

                request.Ids.ToList().ForEach(id =>
                {
                    //_cacheManager.RemoveOnEntityDeleted<Article>(id);
                });
                _eventPublisher.EntitiesDeleted <Article>(request.Ids);

                return(new BulkDeleteArticlesResponse());
            }
        }