public virtual Illustration MapBOToEF( BOIllustration bo) { Illustration efIllustration = new Illustration(); efIllustration.SetProperties( bo.Diagram, bo.IllustrationID, bo.ModifiedDate); return(efIllustration); }
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")); }
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); }