예제 #1
0
        public async Task <List <CounterDetails> > GetCounters()
        {
            var counterData = await _counterRepository.GetCounters();

            var counterList = new List <CounterDetails>();

            foreach (var counter in counterData)
            {
                counterList.Add(_mapper.Map <CounterDetails>(counter));
            }

            return(counterList);
        }
        public IActionResult Index()
        {
            var counters = _counterRepository.GetCounters();

            return(View(counters));
        }