コード例 #1
0
        public GetTasksOutput GetTasks(GetTasksInput input)
        {
            //Called specific GetAllWithPeople method of task repository.
            var tasks = _taskRepository.GetAllWithPeople(input.AssignedPersonId, input.State);

            //Used AutoMapper to automatically convert List<Task> to List<TaskDto>.
            return new GetTasksOutput
                   {
                       Tasks = Mapper.Map<List<TaskDto>>(tasks)
                   };
        }
コード例 #2
0
        public ActionResult TaskList(GetTasksInput input)
        {
            var output = _taskAppService.GetTasks(input);

            return Request.IsAjaxRequest() ? View("_TaskItem", output) : View(output);
        }