コード例 #1
0
        public virtual LessonStatus MapBOToEF(
            BOLessonStatus bo)
        {
            LessonStatus efLessonStatus = new LessonStatus();

            efLessonStatus.SetProperties(
                bo.Id,
                bo.Name,
                bo.StudioId);
            return(efLessonStatus);
        }
コード例 #2
0
        public void MapEFToBO()
        {
            var          mapper = new DALLessonStatusMapper();
            LessonStatus entity = new LessonStatus();

            entity.SetProperties(1, "A", 1);

            BOLessonStatus response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.StudioId.Should().Be(1);
        }
コード例 #3
0
        public void MapEFToBOList()
        {
            var          mapper = new DALLessonStatusMapper();
            LessonStatus entity = new LessonStatus();

            entity.SetProperties(1, "A", 1);

            List <BOLessonStatus> response = mapper.MapEFToBO(new List <LessonStatus>()
            {
                entity
            });

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