示例#1
0
        public async Task <IHttpActionResult> CreateJobApplication(JobApplication jobApplication)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var success = await _repo.CreateJobApplication(jobApplication.JobId, jobApplication.ApplicantId);

            if (success)
            {
                return(Ok("Created new job application"));
            }
            else
            {
                return(BadRequest("Failed to create a new job application"));
            }
        }