Пример #1
0
        public new SkillSmart.Dto.JobPrerequisite GetById(string id)
        {
            JobPrerequisite dbObj = base.GetById(id);

            SkillSmart.Dto.JobPrerequisite seeker = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.JobPrerequisite, SkillSmart.Dto.JobPrerequisite>(dbObj);
            return(seeker);
        }
Пример #2
0
        /// <summary>
        /// Function to get all jobseeker details
        /// </summary>
        /// <returns>List of jobseekers</returns>
        public IEnumerable <SkillSmart.Dto.JobPrerequisite> GetAll(string jobId)
        {
            List <SkillSmart.Dto.JobPrerequisite> jobPrerequisiteCursor = new List <SkillSmart.Dto.JobPrerequisite>();

            if (jobId == "")
            {
                var jobSeekerList = this.MongoCollection.FindAllAs <JobPrerequisite>(); //get all jobseekers

                //Creating jobseeker object jobSeekerCursor
                foreach (JobPrerequisite jobSeeker in jobSeekerList)
                {
                    SkillSmart.Dto.JobPrerequisite jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.JobPrerequisite, SkillSmart.Dto.JobPrerequisite>(jobSeeker);
                    jobPrerequisiteCursor.Add(jobSeekerObj);
                }
            }
            else
            {
                string[]      split     = jobId.Split(',');
                List <string> jobIdList = new List <string>();
                foreach (string item in split)
                {
                    jobIdList.Add(item);
                }
                var JobSkills = this.MongoCollection.AsQueryable <JobPrerequisite>().Where(c => jobIdList.Contains(c.JobId));
                foreach (JobPrerequisite jobSeeker in JobSkills)
                {
                    SkillSmart.Dto.JobPrerequisite jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.JobPrerequisite, SkillSmart.Dto.JobPrerequisite>(jobSeeker);
                    jobPrerequisiteCursor.Add(jobSeekerObj);
                }
            }
            return(jobPrerequisiteCursor);
        }
Пример #3
0
        public void Delete(SkillSmart.Dto.JobPrerequisite entity)
        {
            JobPrerequisite seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.JobPrerequisite, SkillSmartMongoDA.Entities.JobPrerequisite>(entity);

            base.Delete(seeker);
        }