Exemplo n.º 1
0
 public void Update(Applicant applicant)
 {
     using (var db = new ApplicantContext())
     {
         db.Update <Applicant>(applicant);
         db.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void Remove(Applicant applicant)
 {
     using (var db = new ApplicantContext())
     {
         db.Remove <Applicant>(applicant);
         db.SaveChanges();
     }
 }
Exemplo n.º 3
0
 public Applicant Get(int id)
 {
     using (var db = new ApplicantContext())
     {
         return(db.Applicants.
                FirstOrDefault <Applicant>(x => x.ID == id));
     }
 }
Exemplo n.º 4
0
 public void Add(Applicant applicant)
 {
     using (var db = new ApplicantContext())
     {
         db.Applicants.Add(applicant);
         db.SaveChanges();
     }
 }