コード例 #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);
        }