public virtual CountryRegion MapBOToEF(
            BOCountryRegion bo)
        {
            CountryRegion efCountryRegion = new CountryRegion();

            efCountryRegion.SetProperties(
                bo.CountryRegionCode,
                bo.ModifiedDate,
                bo.Name);
            return(efCountryRegion);
        }
Пример #2
0
        public void MapEFToBO()
        {
            var           mapper = new DALCountryRegionMapper();
            CountryRegion entity = new CountryRegion();

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

            BOCountryRegion response = mapper.MapEFToBO(entity);

            response.CountryRegionCode.Should().Be("A");
            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 DALCountryRegionMapper();
            CountryRegion entity = new CountryRegion();

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

            List <BOCountryRegion> response = mapper.MapEFToBO(new List <CountryRegion>()
            {
                entity
            });

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