Beispiel #1
0
 public static CANDIDATE GetCandidateById(int id)
 {
     using (var db = new NoBordersConnectionDB())
     {
         var sql = Sql.Builder.Select("*")
                   .From("Candidates")
                   .Where("id_candidate = @0", id);
         return(db.SingleOrDefault <CANDIDATE>(sql));
     }
 }
Beispiel #2
0
 public static CANDIDATE Delete(int id)
 {
     using (var db = new NoBordersConnectionDB())
     {
         var sql = Sql.Builder.Select("*")
                   .From("Candidates")
                   .Where("id_candidate = @0", id);
         return(db.SingleOrDefault <CANDIDATE>(sql));
         //dataContext.Delete<Employee>(id);
     }
 }