public virtual SpecialOfferProduct MapBOToEF(
            BOSpecialOfferProduct bo)
        {
            SpecialOfferProduct efSpecialOfferProduct = new SpecialOfferProduct();

            efSpecialOfferProduct.SetProperties(
                bo.ModifiedDate,
                bo.ProductID,
                bo.Rowguid,
                bo.SpecialOfferID);
            return(efSpecialOfferProduct);
        }
예제 #2
0
        public void MapEFToBOList()
        {
            var mapper = new DALSpecialOfferProductMapper();
            SpecialOfferProduct entity = new SpecialOfferProduct();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1);

            List <BOSpecialOfferProduct> response = mapper.MapEFToBO(new List <SpecialOfferProduct>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
예제 #3
0
        public void MapEFToBO()
        {
            var mapper = new DALSpecialOfferProductMapper();
            SpecialOfferProduct entity = new SpecialOfferProduct();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1);

            BOSpecialOfferProduct response = mapper.MapEFToBO(entity);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.SpecialOfferID.Should().Be(1);
        }