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