public List <Skill> GetSkills(int profile_id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.Skill.Where(x => x.Profile_Id == profile_id).ToList()); } }
public List <Job> GetJobs() { using (JobMatchEntities context = new JobMatchEntities()) { return(context.Job.Include("Employer").Include("JobSeekerRates").Include("RequiredSkill").ToList()); } }
public int GetIdByUsername(string username) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.JobSeeker.SingleOrDefault(x => x.Username == username).Id); } }
public bool ExistsRateByJob(int job_id, int jobSeeker_Id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.EmployerRates.Any(x => x.Job_Id == job_id && x.JobSeeker_Id == jobSeeker_Id)); } }
public List <EmployerRates> GetRates() { using (JobMatchEntities context = new JobMatchEntities()) { return(context.EmployerRates.ToList()); } }
public Job Select(int id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.Job.Include("Employer").Include("JobSeekerRates").Include("RequiredSkill").SingleOrDefault(x => x.Id == id)); } }
public List <Employer> GetEmployers() { using (JobMatchEntities context = new JobMatchEntities()) { return(context.Employer.Include("Job").Include("EmployerRates").ToList()); } }
public List <RequiredSkill> GetRequiredSkills(int job_id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.RequiredSkill.Where(x => x.Job_Id == job_id).ToList()); } }
public JobSeeker Select(int id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.JobSeeker.Include("Profile").Include("JobSeekerRates").SingleOrDefault(x => x.Id == id)); } }
public Employer Select(int id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.Employer.Include("Job").Include("EmployerRates").SingleOrDefault(x => x.Id == id)); } }
public List <JobSeeker> GetJobSeekers() { using (JobMatchEntities context = new JobMatchEntities()) { return(context.JobSeeker.Include("JobSeekerRates").Include("Profile").ToList()); } }
public void Insert(EmployerRates obj) { using (JobMatchEntities context = new JobMatchEntities()) { context.EmployerRates.Add(obj); context.SaveChanges(); } }
public void Insert(Job obj) { using (JobMatchEntities context = new JobMatchEntities()) { context.Job.Add(obj); context.SaveChanges(); } }
public void Insert(RequiredSkill obj) { using (JobMatchEntities context = new JobMatchEntities()) { context.RequiredSkill.Add(obj); context.SaveChanges(); } }
public Profile Select(int id) { using (JobMatchEntities context = new JobMatchEntities()) { return(context.Profile.Include("EmployerRates") .Include("JobSeeker") .Include("Skill").SingleOrDefault(x => x.JobSeeker_Id == id)); } }
public void Delete(int id) { Profile profile = null; using (JobMatchEntities context = new JobMatchEntities()) { profile = context.Profile.SingleOrDefault(x => x.JobSeeker_Id == id); if (profile != null) { context.Profile.Remove(profile); context.SaveChanges(); } } }
public void Delete(int id) { JobSeeker jobSeeker = null; using (JobMatchEntities context = new JobMatchEntities()) { jobSeeker = context.JobSeeker.SingleOrDefault(x => x.Id == id); if (jobSeeker != null) { context.JobSeeker.Remove(jobSeeker); context.SaveChanges(); } } }
public void Delete(int job_id, string skill) { RequiredSkill obj = null; using (JobMatchEntities context = new JobMatchEntities()) { obj = context.RequiredSkill.SingleOrDefault(x => x.Job_Id == job_id && x.Skill == skill); if (obj != null) { context.RequiredSkill.Remove(obj); context.SaveChanges(); } } }
public void Delete(int employer_Id, int jobSeeker_Id, int job_Id) { EmployerRates rate = null; using (JobMatchEntities context = new JobMatchEntities()) { rate = context.EmployerRates.SingleOrDefault(x => x.JobSeeker_Id == jobSeeker_Id && x.Job_Id == job_Id && x.Employer_Id == employer_Id); if (rate != null) { context.EmployerRates.Remove(rate); context.SaveChanges(); } } }
public void Delete(int profile_id, string skill) { Skill obj = null; using (JobMatchEntities context = new JobMatchEntities()) { obj = context.Skill.SingleOrDefault(x => x.Profile_Id == profile_id && x.Skill1 == skill); if (obj != null) { context.Skill.Remove(obj); context.SaveChanges(); } } }
public void Delete(int id) { Employer employer = null; using (JobMatchEntities context = new JobMatchEntities()) { employer = context.Employer.SingleOrDefault(x => x.Id == id); if (employer != null) { context.Employer.Remove(employer); context.SaveChanges(); } } }
public void Delete(int id) { Job job = null; using (JobMatchEntities context = new JobMatchEntities()) { job = context.Job.FirstOrDefault(x => x.Id == id); if (job != null) { context.Job.Remove(job); context.SaveChanges(); } } }
public void DeleteAllRates(int employer_id) { using (JobMatchEntities context = new JobMatchEntities()) { if (context.EmployerRates.Any(x => x.Employer_Id == employer_id)) { var rates = context.EmployerRates.Where(x => x.Employer_Id == employer_id); foreach (EmployerRates rate in rates) { context.EmployerRates.Remove(rate); } context.SaveChanges(); } } }
public void Update(Employer obj) { Employer emp = null; using (JobMatchEntities context = new JobMatchEntities()) { emp = context.Employer.SingleOrDefault(x => x.Id == obj.Id); if (emp != null) { emp.Email = obj.Email; emp.Password = obj.Password; emp.Username = obj.Username; context.SaveChanges(); } } }
public void Update(JobSeeker obj) { JobSeeker jobSeeker = null; using (JobMatchEntities context = new JobMatchEntities()) { jobSeeker = context.JobSeeker.SingleOrDefault(x => x.Id == obj.Id); if (jobSeeker != null) { jobSeeker.Email = obj.Email; jobSeeker.Password = obj.Password; jobSeeker.Username = obj.Username; context.SaveChanges(); } } }
public void Update(Job obj) { Job job = null; using (JobMatchEntities context = new JobMatchEntities()) { job = context.Job.SingleOrDefault(x => x.Id == obj.Id); if (job != null) { job.AditionalRequirements = obj.AditionalRequirements; job.EducationRequirements = obj.EducationRequirements; job.Employer_Id = obj.Employer_Id; job.JobDescription = obj.JobDescription; job.Position = obj.Position; context.SaveChanges(); } } }
public void Update(Profile obj) { Profile profile = null; using (JobMatchEntities context = new JobMatchEntities()) { profile = context.Profile.SingleOrDefault(x => x.JobSeeker_Id == obj.JobSeeker_Id); if (profile != null) { profile.LastName = obj.LastName; profile.ShortDescription = obj.ShortDescription; profile.WorkExperience = obj.WorkExperience; profile.Education = obj.Education; profile.ContactData = obj.ContactData; context.SaveChanges(); } } }