public LocalizationKeyDictionary Put(LocalizationKeyDictionary request) { var repository = GetRepository(); var requestEntity = TranslateToKeyEntity(request); var returnEntity = repository.UpdateAllKeyValues(requestEntity); return TranslateToKeyResponse(returnEntity); }
public LocalizationKeyDictionary Get(LocalizationKeyDictionary request) { var repository = GetRepository(); var returnDictionary = repository.ReadAllKeyValues(request.Key); if (returnDictionary == null) return null; return TranslateToKeyResponse(returnDictionary); }
public void Delete(LocalizationKeyDictionary request) { var repository = GetRepository(); repository.DeleteAllKeyValues(request.Key); }
private LocalizationKeyCollectionEntity TranslateToKeyEntity(LocalizationKeyDictionary request) { LocalizationKeyCollectionEntity response = request.TranslateTo<LocalizationKeyCollectionEntity>(); request.KeyValues.ForEach(x => response.KeyValues.Add(x.TranslateTo<LocalizationKeyEntity>())); return response; }