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> AllLocalizations() { var localizations = await _localizationRepository.GetAllAsync(); if (!localizations.Any()) { return(NotFound()); } return(Ok(_mapper.Map <List <LocalizationModel> >(localizations))); }