private async Task <Feature> UpdateElasticSearch(ICompleteOsmGeo osm, string name) { var feature = ConvertOsmToFeature(osm, name); if (feature != null) { await _elasticSearchGateway.UpdateNamesData(feature); } return(feature); }
private async Task <Feature> UpdateElasticSearch(ICompleteOsmGeo osm, string name) { var features = _osmGeoJsonPreprocessorExecutor.Preprocess( new Dictionary <string, List <ICompleteOsmGeo> > { { name, new List <ICompleteOsmGeo> { osm } } }); var feature = features.Values.FirstOrDefault()?.FirstOrDefault(); if (feature != null) { await _elasticSearchGateway.UpdateNamesData(feature); } return(feature); }