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)); } }
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); } }