/// <summary> /// Function to get all extra curricular activity /// </summary> /// <param name="entity">ExtraCurricularActivity Object</param> public void Create(SkillSmart.Dto.ExtraCurricularActivity entity) { ExtraCurricularActivity seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.ExtraCurricularActivity, SkillSmartMongoDA.Entities.ExtraCurricularActivity>(entity); base.Create(seeker); entity.Id = seeker.Id; }
/// <summary> /// Function to get an ExtraCurricular Activity details /// </summary> /// <param name="id">ExtraCurricularActivityId</param> /// <returns>ExtraCurricularActivity Object</returns> public new SkillSmart.Dto.ExtraCurricularActivity GetById(string id) { ExtraCurricularActivity dbObj = base.GetById(id); SkillSmart.Dto.ExtraCurricularActivity seeker = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.ExtraCurricularActivity, SkillSmart.Dto.ExtraCurricularActivity>(dbObj); return(seeker); }
/// <summary> /// Function to get all extra curricular activity /// </summary> /// <param name="id">EducationId</param> /// <returns>ExtraCurricularActivity List</returns> public IEnumerable <SkillSmart.Dto.ExtraCurricularActivity> GetAllExtraCurricularActivityById(string id) { var jobSeekerExtraCurricularActivityList = this.MongoCollection.FindAllAs <ExtraCurricularActivity>(); List <SkillSmart.Dto.ExtraCurricularActivity> jobSeekerExtraCurricularActivity = new List <SkillSmart.Dto.ExtraCurricularActivity>(); foreach (ExtraCurricularActivity jobSeeker in jobSeekerExtraCurricularActivityList) { if (jobSeeker.JobSeekerId == id) { SkillSmart.Dto.ExtraCurricularActivity jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.ExtraCurricularActivity, SkillSmart.Dto.ExtraCurricularActivity>(jobSeeker); jobSeekerExtraCurricularActivity.Add(jobSeekerObj); } } return(jobSeekerExtraCurricularActivity); }