Example #1
0
        public async Task <IActionResult> Index()
        {
            // todo: pagination
            var dtoList = await _banService.ListAsync(ban => (ban.End >= DateTime.UtcNow), ban => ban.Created, true);

            var viewModelList = _mapper.Map <List <BanViewModel> >(dtoList);

            return(View(viewModelList));
        }