コード例 #1
0
        public async Task <IActionResult> Get(int portfolioId = 0)
        {
            if (GetClaim <string>(CcClaimType.UserType) == UserType.Student.ToString())
            {
                portfolioId = GetClaim <int>(CcClaimType.StudentPortfolioId);
            }
            var userAccountId      = GetClaim <int>(CcClaimType.UserAccountId);
            var transcriptRequests = await _transcriptRequestService.GetTranscriptRequestByPortfolioIdAsync(portfolioId, userAccountId);

            return(Ok(transcriptRequests));
        }
コード例 #2
0
        public TranscriptRequestQuery(ITranscriptRequestService transcriptRequestService)
        {
            Name = "Query";
            Field <StringGraphType>("hello", resolve: (context) => {
                return("Congratulations! you got admission.");
            });

            Field <StudentType>("student", resolve: (context) => {
                return(new Student {
                    FirstName = "Test", LastName = "complex object"
                });
            });

            Field <ListGraphType <TranscriptResponseModelType> >("transcriptrequests", resolve: (context) =>
            {
                var requests = transcriptRequestService.GetTranscriptRequestByPortfolioIdAsync(15829712, 179234);
                return(requests);
            });
        }