public async Task <bool> ExecuteAsync()
        {
            try
            {
                // Delete All Service
                await _deleteAllService.ExecuteAsync();

                //Get All Service
                var pagingService = await _getAllPagingPostServiceQuery.ExecuteAsync(string.Empty, 1, 0, false, 1);

                var listService = pagingService.Results;
                await _elasticSearchRepository.SaveManyAsync(listService.ToArray());

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetAllPagingPostService(string keyword, int page, int pageSize, bool isAdminPage, int filter)
        {
            var model = await _getAllPagingPostServiceQuery.ExecuteAsync(keyword, page, pageSize, isAdminPage, filter);

            return(new OkObjectResult(model));
        }