public virtual ProductProductPhoto MapBOToEF( BOProductProductPhoto bo) { ProductProductPhoto efProductProductPhoto = new ProductProductPhoto(); efProductProductPhoto.SetProperties( bo.ModifiedDate, bo.Primary, bo.ProductID, bo.ProductPhotoID); return(efProductProductPhoto); }
public void MapEFToBOList() { var mapper = new DALProductProductPhotoMapper(); ProductProductPhoto entity = new ProductProductPhoto(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), true, 1, 1); List <BOProductProductPhoto> response = mapper.MapEFToBO(new List <ProductProductPhoto>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALProductProductPhotoMapper(); ProductProductPhoto entity = new ProductProductPhoto(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), true, 1, 1); BOProductProductPhoto response = mapper.MapEFToBO(entity); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Primary.Should().Be(true); response.ProductID.Should().Be(1); response.ProductPhotoID.Should().Be(1); }