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; } }
public async Task <IActionResult> DeleteAllService() { var model = await _deleteAllService.ExecuteAsync(); return(new ObjectResult(model)); }