public async Task <IActionResult> GetCountriesAsync() { Logger.LogDebug("Countries were requested"); var countries = await CountriesProvider?.GetCountriesAsync(); return(Ok((countries ?? new Country[] {}) .Select(c => new CountryDto { Code = c.Code, Title = c.Title }).ToArray())); }