public IActionResult Index() { var userTasks = userTaskRepository.GetAll(); var taskViewModels = mapper.Map <List <UserTaskViewModel> >(userTasks); return(View(taskViewModels)); }
/// <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>()); }