예제 #1
0
        public virtual LessonXTeacher MapBOToEF(
            BOLessonXTeacher bo)
        {
            LessonXTeacher efLessonXTeacher = new LessonXTeacher();

            efLessonXTeacher.SetProperties(
                bo.Id,
                bo.LessonId,
                bo.StudentId);
            return(efLessonXTeacher);
        }
예제 #2
0
        public void MapEFToBO()
        {
            var            mapper = new DALLessonXTeacherMapper();
            LessonXTeacher entity = new LessonXTeacher();

            entity.SetProperties(1, 1, 1);

            BOLessonXTeacher response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
예제 #3
0
        public void MapEFToBOList()
        {
            var            mapper = new DALLessonXTeacherMapper();
            LessonXTeacher entity = new LessonXTeacher();

            entity.SetProperties(1, 1, 1);

            List <BOLessonXTeacher> response = mapper.MapEFToBO(new List <LessonXTeacher>()
            {
                entity
            });

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