/// <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()); } }
/// <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()); } }
/// <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()); } }
/// <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()); } }