コード例 #1
0
        public async Task <IActionResult> GetCourseWorkApplications(long courseWorkId)
        {
            var applications = await _applicationsService
                               .GetFilteredApplicationsAsync(app => app.CourseWorkId == courseWorkId)
                               .ConfigureAwait(false);

            return(Ok(applications));
        }
コード例 #2
0
        public async Task <IActionResult> GetApplications(string status)
        {
            if (status != "active")
            {
                return(NotFound());
            }

            var userId       = Request.GetUserId();
            var applications = await _applicationsService
                               .GetFilteredApplicationsAsync(app => app.StudentProfileId == userId || app.CourseWork.LecturerProfileId == userId)
                               .ConfigureAwait(false);

            return(Ok(applications));
        }