示例#1
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);
                }
            }
        }
示例#2
0
        public async Task <IActionResult> AllLocalizations()
        {
            var localizations = await _localizationRepository.GetAllAsync();

            if (!localizations.Any())
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <List <LocalizationModel> >(localizations)));
        }