public async Task Modify(LocalizationEntity localEntity) { var document = await _localizationRepository.GetByCode(localEntity.DisplayKey); if (document == null) { await _localizationRepository.Insert(localEntity); } else { await _localizationRepository.Update(localEntity); } }