/// <summary> /// Function to get details of a particular work history of the jobseeker /// </summary> /// <param name="id">WorkHistoryId</param> /// <returns>WorkHistory Object</returns> public new SkillSmart.Dto.WorkHistory GetById(string id) { WorkHistory dbObj = base.GetById(id); SkillSmart.Dto.WorkHistory seeker = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.WorkHistory, SkillSmart.Dto.WorkHistory>(dbObj); return(seeker); }
/// <summary> /// Function to Create new work history details for the jobseeker /// </summary> /// <param name="entity">WorkHistory Object</param> public void Create(SkillSmart.Dto.WorkHistory entity) { WorkHistory seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.WorkHistory, SkillSmartMongoDA.Entities.WorkHistory>(entity); base.Create(seeker); entity.Id = seeker.Id; }
/// <summary> /// Function to Get all Work history details of the jobseeker /// </summary> /// <param name="id">JobSeekerId</param> /// <returns>List of work history details of the jobseeker</returns> public IEnumerable <SkillSmart.Dto.WorkHistory> GetJobSeekerWorkHistoryById(string id) { var jobSeekerWorkHistoryList = this.MongoCollection.AsQueryable <WorkHistory>().Where(e => e.JobSeekerId == id); List <SkillSmart.Dto.WorkHistory> jobSeekerWorkHostory = new List <SkillSmart.Dto.WorkHistory>(); foreach (WorkHistory jobSeeker in jobSeekerWorkHistoryList) { SkillSmart.Dto.WorkHistory jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.WorkHistory, SkillSmart.Dto.WorkHistory>(jobSeeker); jobSeekerWorkHostory.Add(jobSeekerObj); } return(jobSeekerWorkHostory); }
/// <summary> /// Function to Get all Work history details of the jobseeker /// </summary> /// <param name="id">JobSeekerId</param> /// <returns>List of work history details of the jobseeker</returns> public IEnumerable <SkillSmart.Dto.WorkHistory> GetAllJobSeekersWorkHistory(string id) { string[] split = id.Split(','); List <string> jobSeekerIdList = new List <string>(); foreach (string item in split) { jobSeekerIdList.Add(item); } var jobSeekerWorkHistoryList = this.MongoCollection.AsQueryable <WorkHistory>().Where(c => jobSeekerIdList.Contains(c.JobSeekerId)); List <SkillSmart.Dto.WorkHistory> jobSeekerWorkHostory = new List <SkillSmart.Dto.WorkHistory>(); foreach (WorkHistory jobSeeker in jobSeekerWorkHistoryList) { SkillSmart.Dto.WorkHistory jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.WorkHistory, SkillSmart.Dto.WorkHistory>(jobSeeker); jobSeekerWorkHostory.Add(jobSeekerObj); } return(jobSeekerWorkHostory); }
/// <summary> /// Function to Delete WorkHistory details /// </summary> /// <param name="entity">WorkHistory Object</param> public void Delete(SkillSmart.Dto.WorkHistory entity) { WorkHistory seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.WorkHistory, SkillSmartMongoDA.Entities.WorkHistory>(entity); base.Delete(seeker); }