コード例 #1
0
        public async Task <ActionResult <Application> > GetApplication(int id)
        {
            var request  = new GetApplicationByIdRequest(id);
            var response = await _mediator.Send(request);

            return(Ok(response));
        }
コード例 #2
0
        public async Task <GetApplicationByIdResponse> GetApplicationById(GetApplicationByIdRequest o)
        {
            var result = new GetApplicationByIdResponse(o.RequestId);

            result.Application = await Server.GetApplicationById(o.Id);

            return(result);
        }
コード例 #3
0
        public GetApplicationByIdRequestResponse Get(GetApplicationByIdRequest request)
        {
            var agent = new UserModel();

            var getApplicationInteractor = TryResolve <GetApplicationByIdInteractor>();
            var getApplicationByIdInput  = new GetApplicationByIdInput {
                ApplicationId = request.ApplicationId
            };
            var getApplicationByIdOutput = getApplicationInteractor.Handle(agent, getApplicationByIdInput);

            var response = new GetApplicationByIdRequestResponse {
                Result = getApplicationByIdOutput.Application.ToApplicationDto()
            };

            return(response);
        }