public async Task <bool> DeleteStringResourceAsync(LocaleStringResource resource)
        {
            var result = await _repository.DeleteAsync(resource);

            if (result)
            {
                RemoveCachedLanguage(resource.LanguageId);
            }

            return(result);
        }
Beispiel #2
0
        public async Task DeleteByAppIdAsync(string appId)
        {
            var allLocalizations = await _localizationRepository.GetAllAsync(a => a.AppId == appId);

            if (allLocalizations != null && allLocalizations.Any())
            {
                foreach (var locale in allLocalizations)
                {
                    await _localizationRepository.DeleteAsync(locale.Id);
                }
            }
        }
        public async Task <IActionResult> Delete(string id)
        {
            await _localizationRepository.DeleteAsync(id);

            return(Ok());
        }