コード例 #1
0
        public async Task <ActionResult> GetApplications()
        {
            var applications = from application in await _jobApplicationService.GetJobApplicationsAsync()
                               select $"{application.Id}," +
                               $"{application.ApplicantId}," +
                               $"{application.ApplicantName}," +
                               $"{application.ApplicationDate}," +
                               $"{application.ApplicationApproved}," +
                               $"{application.ApplicantCollege}," +
                               $"{application.JobListing.JobTitle}," +
                               $"{application.JobListing.ListingDate}," +
                               $"{application.JobListing.EmployerId}";

            if (applications == null)
            {
                return(NoContent());
            }

            applications = applications.Prepend("Id, Applicant Id, Name, Date, Approval, College, Job, Listing date, EmployerId");
            return(Ok(String.Join("\n", applications)));
        }