Example #1
0
        public virtual Illustration MapBOToEF(
            BOIllustration bo)
        {
            Illustration efIllustration = new Illustration();

            efIllustration.SetProperties(
                bo.Diagram,
                bo.IllustrationID,
                bo.ModifiedDate);
            return(efIllustration);
        }
Example #2
0
        public void MapEFToBO()
        {
            var          mapper = new DALIllustrationMapper();
            Illustration entity = new Illustration();

            entity.SetProperties("A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"));

            BOIllustration response = mapper.MapEFToBO(entity);

            response.Diagram.Should().Be("A");
            response.IllustrationID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Example #3
0
        public void MapEFToBOList()
        {
            var          mapper = new DALIllustrationMapper();
            Illustration entity = new Illustration();

            entity.SetProperties("A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"));

            List <BOIllustration> response = mapper.MapEFToBO(new List <Illustration>()
            {
                entity
            });

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