public ListKeyValuePair <int, string> AreaId(CallContext context = default) { _logger.LogTrace("Query: " + GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name); var areaRepository = _s7AreaRepository.GetAllArea(); var areaDns = areaRepository.ToList().Select( area => new KeyValuePair <int, string>(area.Id, area.AreaName)) .ToList(); return(new ListKeyValuePair <int, string>(areaDns)); }