示例#1
0
        public async ValueTask <ListKeyValuePair <int, string> > AreaIdAsync(CallContext context = default)
        {
            _logger.LogTrace("Query: " + GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name);

            var areaRepository = await _s7AreaRepository.GetAllAreaAsync();

            var areaDns = areaRepository.ToList().Select(
                area =>
                new KeyValuePair <int, string>(area.Id, area.AreaName))
                          .ToList();

            return(new ListKeyValuePair <int, string>(areaDns));
        }