Exemplo n.º 1
0
        public FeedbacksTableDto GetAll(FeedbacksTableFilterModelDto feedbacksTableFilter)
        {
            FeedbackQuery feedbackQuery = _mapper.Map <FeedbackQuery>(feedbacksTableFilter);

            IPagedList <Feedback>       feedback = _feedbackService.Get(feedbackQuery);
            List <FeedbacksTableRowDto> feedbacksTableRowDtos =
                _mapper.Map <IEnumerable <Feedback>, IEnumerable <FeedbacksTableRowDto> >(feedback).ToList();

            return(new FeedbacksTableDto
            {
                FeedbacksTableRows = feedbacksTableRowDtos,
                TotalDisplayedRecords = feedback.TotalCount,
                TotalRecords = feedback.TotalCount
            });
        }
        /// <summary>
        /// Index view
        /// </summary>
        /// <returns>Action result</returns>
        public ActionResult Index()
        {
            var feedbacks = _feedbackService.Get().ConvertAll(f => new RequestsViewModel(f));

            return(View(feedbacks));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Index view
        /// </summary>
        /// <returns>Action result</returns>
        public ActionResult Index()
        {
            var feedbacks = _feedbackService.Get().Select(f => new RequestsViewModel(f)).ToList();

            return(View(feedbacks));
        }