public IEnumerable <CandidateDTO> GetAllCandidates() { using (CandidatesDBContext context = new CandidatesDBContext()) { IEnumerable <Candidate> candidates = context.Candidates; return(MapperConfig.MapperDAL.Map <IEnumerable <CandidateDTO> >(candidates)); } }
public void CanAccessDatabase() { using (var ctx = new CandidatesDBContext()) { Skill skill = new Skill("test"); ctx.Skills.Add(skill); ctx.SaveChanges(); ctx.Skills.Remove(skill); ctx.SaveChanges(); } }
public CandidateController(CandidatesDBContext context) { _context = context; }
public SQLPersistenceManager() { intranetCtx = new IntranetDBContext(); candidateDBContext = new CandidatesDBContext(); }
public CandidateDAO(CandidatesDBContext ctx) { this.ctx = ctx; }