public virtual ContactType MapBOToEF(
            BOContactType bo)
        {
            ContactType efContactType = new ContactType();

            efContactType.SetProperties(
                bo.ContactTypeID,
                bo.ModifiedDate,
                bo.Name);
            return(efContactType);
        }
예제 #2
0
        public void MapEFToBO()
        {
            var         mapper = new DALContactTypeMapper();
            ContactType entity = new ContactType();

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

            BOContactType response = mapper.MapEFToBO(entity);

            response.ContactTypeID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }
예제 #3
0
        public void MapEFToBOList()
        {
            var         mapper = new DALContactTypeMapper();
            ContactType entity = new ContactType();

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

            List <BOContactType> response = mapper.MapEFToBO(new List <ContactType>()
            {
                entity
            });

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