public async Task <HopDto> DeleteHopAsync(int id) { var hop = await _hopRepository.GetSingleAsync(id); var hopDto = await _hopElasticsearch.GetSingleAsync(id); if (hop != null) { await _hopRepository.RemoveAsync(hop); } if (hopDto != null) { await _hopElasticsearch.DeleteAsync(id); } return(hopDto); }