public async Task <ActionResult> ApplyConfirmed(int id) { var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId())); using (JobSeekerBLL jsbll = new JobSeekerBLL()) { var application = await jsbll.GetApplication(jobSeekerUser.JobSeekerID.Value, id); if (application == null) { await jsbll.Apply(jobSeekerUser.JobSeekerID.Value, id); } } return(RedirectToAction("Index")); }
public async Task <IHttpActionResult> Apply(int jobSeekerId, int jobId) { await bll.Apply(jobSeekerId, jobId); return(StatusCode(HttpStatusCode.NoContent)); }