public IActionResult GetMyTasks(int id) { var tasks = _allReadyDataAccess.GetTasksAssignedToUser(id, User.GetUserId()); var taskView = tasks.Select(t => new TaskSignupViewModel(t)); return(Json(taskView)); }
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)); }
public IEnumerable <TaskSignupViewModel> Handle(GetMyTasksQuery message) { var tasks = _allReadyDataAccess.GetTasksAssignedToUser(message.ActivityId, message.UserId); return(tasks.Select(t => new TaskSignupViewModel(t))); }