public async Task <IEnumerable <QuestionViewModel> > Get(string filter, string limit = "10", string offset = "0") { int _limit, _offset = 0; int.TryParse(limit, out _limit); int.TryParse(offset, out _offset); return(await _questionAppService.GetAll(filter, _limit, _offset)); }
public async Task <ActionResult> Index() { var questions = (_questionAppService.GetAll(new PagedAndSortedResultRequestDto { MaxResultCount = int.MaxValue })).Items; var model = new QuestionListViewModel() { Questions = questions }; return(View(model)); }
public async Task <ActionResult> Index() { HomeViewModel viewModel = new HomeViewModel { PagedResultDto = await _questionAppService.GetAll(new PagedResultRequestDto() { MaxResultCount = 100 }), }; var user = await _userManager.GetUserByIdAsync(AbpSession.UserId.GetValueOrDefault()); viewModel.CurrentUser = user.MapTo <UserDto>(); return(View(viewModel)); }
public IEnumerable <QuestionViewModel> GetAll() { return(_questionAppService.GetAll()); }