コード例 #1
0
        public IActionResult GetMyTasks(int id)
        {
            var tasks = _allReadyDataAccess.GetTasksAssignedToUser(id, User.GetUserId());

            var taskView = tasks.Select(t => new TaskSignupViewModel(t));

            return(Json(taskView));
        }
コード例 #2
0
        public async Task <IActionResult> GetMyTasks(int id)
        {
            var user = await GetCurrentUserAsync();

            var tasks = _allReadyDataAccess.GetTasksAssignedToUser(id, user);

            var taskView = tasks.Select(t => new TaskSignupViewModel(t));

            return(Json(taskView));
        }
コード例 #3
0
        public IEnumerable <TaskSignupViewModel> Handle(GetMyTasksQuery message)
        {
            var tasks = _allReadyDataAccess.GetTasksAssignedToUser(message.ActivityId, message.UserId);

            return(tasks.Select(t => new TaskSignupViewModel(t)));
        }