コード例 #1
0
        public new SkillSmart.Dto.JobSkills GetById(string id)
        {
            JobSkills dbObj = base.GetById(id);

            SkillSmart.Dto.JobSkills seeker = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.JobSkills, SkillSmart.Dto.JobSkills>(dbObj);
            return(seeker);
        }
コード例 #2
0
        /// <summary>
        /// Function to get all jobseeker details
        /// </summary>
        /// <returns>List of jobseekers</returns>
        public IEnumerable <SkillSmart.Dto.JobSkills> GetAll(string jobId)
        {
            List <SkillSmart.Dto.JobSkills> jobListCursor = new List <SkillSmart.Dto.JobSkills>();

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

                //Creating jobseeker object jobSeekerCursor
                foreach (JobSkills jobSeeker in jobSeekerList)
                {
                    SkillSmart.Dto.JobSkills jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.JobSkills, SkillSmart.Dto.JobSkills>(jobSeeker);
                    jobListCursor.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 <JobSkills>().Where(c => jobIdList.Contains(c.JobId));
                foreach (JobSkills jobSeeker in JobSkills)
                {
                    SkillSmart.Dto.JobSkills jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.JobSkills, SkillSmart.Dto.JobSkills>(jobSeeker);
                    jobListCursor.Add(jobSeekerObj);
                }
            }
            return(jobListCursor);
        }
コード例 #3
0
        public void Delete(SkillSmart.Dto.JobSkills entity)
        {
            JobSkills seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.JobSkills, SkillSmartMongoDA.Entities.JobSkills>(entity);

            base.Delete(seeker);
        }