示例#1
0
        /// <summary>
        /// Function to get a Category details
        /// </summary>
        /// <param name="id">CategoryId</param>
        /// <returns>Category object</returns>
        public new SkillSmart.Dto.Category GetById(string id)
        {
            Category dbObj = base.GetById(id);

            SkillSmart.Dto.Category seeker = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.Category, SkillSmart.Dto.Category>(dbObj);
            return(seeker);
        }
示例#2
0
        /// <summary>
        /// Function to get all Category
        /// </summary>
        /// <returns>Category object</returns>
        public IEnumerable <SkillSmart.Dto.Category> GetAllCategory()
        {
            var categoryList = this.MongoCollection.FindAllAs <Category>();

            List <SkillSmart.Dto.Category> category = new List <SkillSmart.Dto.Category>();

            foreach (Category jobSeeker in categoryList)
            {
                SkillSmart.Dto.Category jobSeekerObj = MapperUtilities.MapToViewModel <SkillSmartMongoDA.Entities.Category, SkillSmart.Dto.Category>(jobSeeker);
                category.Add(jobSeekerObj);
            }
            return(category);
        }
示例#3
0
 public void Delete(SkillSmart.Dto.Category entity)
 {
 }
示例#4
0
        /// <summary>
        /// Function to Update a Category
        /// </summary>
        /// <param name="entity">Category object</param>
        public void Update(SkillSmart.Dto.Category entity)
        {
            Category seeker = MapperUtilities.MapToDomainModel <SkillSmart.Dto.Category, SkillSmartMongoDA.Entities.Category>(entity);

            base.Update(seeker);
        }