Exemple #1
0
 public void DeclineCandidate(int id)
 {
     using (var context = new CTContext(_conn))
     {
         var candidate = context.Candidates.FirstOrDefault(c => c.Id == id);
         candidate.Status = 2;
         context.Candidates.Update(candidate);
         context.SaveChanges();
     }
 }
Exemple #2
0
 public void AddCandidate(Candidate c)
 {
     using (var context = new CTContext(_conn))
     {
         var candidate = new Candidate
         {
             Name   = c.Name,
             Email  = c.Email,
             Number = c.Number,
             Notes  = c.Notes,
             Status = 0
         };
         context.Candidates.Add(candidate);
         context.SaveChanges();
     }
 }