Esempio n. 1
0
        public new SkillSmart.Dto.Education GetById(string id)
        {
            Education dbObj = base.GetById(id);

            SkillSmart.Dto.Education seeker = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.Education, SkillSmart.Dto.Education>(dbObj);
            return(seeker);
        }
Esempio n. 2
0
        public void Create(SkillSmart.Dto.Education entity)
        {
            Education seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.Education, SkillSmartMongoDA.Entities.Education>(entity);

            base.Create(seeker);
            entity.Id = seeker.Id;
        }
Esempio n. 3
0
        public IEnumerable <SkillSmart.Dto.Education> GetAllEducationById(string id)
        {
            var jobSeekerEducationList = this.MongoCollection.FindAllAs <Education>();

            List <SkillSmart.Dto.Education> jobSeekerEducation = new List <SkillSmart.Dto.Education>();

            foreach (Education jobSeeker in jobSeekerEducationList)
            {
                if (jobSeeker.JobSeekerId == id)
                {
                    SkillSmart.Dto.Education jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.Education, SkillSmart.Dto.Education>(jobSeeker);
                    jobSeekerEducation.Add(jobSeekerObj);
                }
            }
            return(jobSeekerEducation);
        }
        /// <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.Education> GetAllJobSeekersEducation(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 <Education>().Where(c => jobSeekerIdList.Contains(c.JobSeekerId));

            List <SkillSmart.Dto.Education> jobSeekerWorkHostory = new List <SkillSmart.Dto.Education>();

            foreach (Education jobSeeker in jobSeekerWorkHistoryList)
            {
                SkillSmart.Dto.Education jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.Education, SkillSmart.Dto.Education>(jobSeeker);
                jobSeekerWorkHostory.Add(jobSeekerObj);
            }
            return(jobSeekerWorkHostory);
        }
Esempio n. 5
0
        public void Delete(SkillSmart.Dto.Education entity)
        {
            Education seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.Education, SkillSmartMongoDA.Entities.Education>(entity);

            base.Delete(seeker);
        }