public virtual TeacherSkill MapBOToEF(
            BOTeacherSkill bo)
        {
            TeacherSkill efTeacherSkill = new TeacherSkill();

            efTeacherSkill.SetProperties(
                bo.Id,
                bo.Name);
            return(efTeacherSkill);
        }
        public void MapEntityToModel()
        {
            var          mapper = new DALTeacherSkillMapper();
            TeacherSkill item   = new TeacherSkill();

            item.SetProperties(1, "A");
            ApiTeacherSkillServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Ejemplo n.º 3
0
        public void MapEFToBO()
        {
            var          mapper = new DALTeacherSkillMapper();
            TeacherSkill entity = new TeacherSkill();

            entity.SetProperties(1, "A");

            BOTeacherSkill response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Ejemplo n.º 4
0
        public virtual TeacherSkill MapModelToEntity(
            int id,
            ApiTeacherSkillServerRequestModel model
            )
        {
            TeacherSkill item = new TeacherSkill();

            item.SetProperties(
                id,
                model.Name);
            return(item);
        }
        public void MapEntityToModelList()
        {
            var          mapper = new DALTeacherSkillMapper();
            TeacherSkill item   = new TeacherSkill();

            item.SetProperties(1, "A");
            List <ApiTeacherSkillServerResponseModel> response = mapper.MapEntityToModel(new List <TeacherSkill>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 6
0
        public void MapEFToBOList()
        {
            var          mapper = new DALTeacherSkillMapper();
            TeacherSkill entity = new TeacherSkill();

            entity.SetProperties(1, "A");

            List <BOTeacherSkill> response = mapper.MapEFToBO(new List <TeacherSkill>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }