public IActionResult Index()
        {
            var userTasks      = userTaskRepository.GetAll();
            var taskViewModels = mapper.Map <List <UserTaskViewModel> >(userTasks);

            return(View(taskViewModels));
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public List <UserTaskModel> GetUserTasks()
        {
            var items = UserTaskRepository.GetAll();

            if (items != null)
            {
                return(items.Select(p => p.ToModel()).ToList());
            }
            return(new List <UserTaskModel>());
        }