コード例 #1
0
        public async Task <IEnumerable <AssignmentInfo> > HandleAsync(GetAllAssignmentsQuery _)
        {
            var assignments = await _repository.GetAll();

            return(assignments.Select(assignment => {
                return _mapper.Map <AssignmentInfo>(assignment);
            }));
        }
コード例 #2
0
        public async Task <ActionResult> Get()
        {
            var query       = new GetAllAssignmentsQuery {
            };
            var assignments = await _queryHandler.HandleAsync(query);

            return(Ok(assignments));
        }