public IEnumerable <Applicant> GetRejected()
 {
     using (var context = new CandidatesDataContext(_connectionString))
     {
         return(context.Applicants.Where(a => a.Status == Status.Rejected).ToList());
     }
 }
 public void Update(Status s, int id)
 {
     using (var context = new CandidatesDataContext(_connectionString))
     {
         context.ExecuteCommand("UPDATE Candidates SET Status = {0} WHERE Id = {1}", s, id);
     }
 }
 public void AddCandidate(Applicant applicant)
 {
     applicant.Status = Status.Pending;
     using (var context = new CandidatesDataContext(_connectionString))
     {
         context.Applicants.InsertOnSubmit(applicant);
         context.SubmitChanges();
     }
 }