public virtual ProductListPriceHistory MapBOToEF( BOProductListPriceHistory bo) { ProductListPriceHistory efProductListPriceHistory = new ProductListPriceHistory(); efProductListPriceHistory.SetProperties( bo.EndDate, bo.ListPrice, bo.ModifiedDate, bo.ProductID, bo.StartDate); return(efProductListPriceHistory); }
public void MapEFToBOList() { var mapper = new DALProductListPriceHistoryMapper(); ProductListPriceHistory entity = new ProductListPriceHistory(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM")); List <BOProductListPriceHistory> response = mapper.MapEFToBO(new List <ProductListPriceHistory>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALProductListPriceHistoryMapper(); ProductListPriceHistory entity = new ProductListPriceHistory(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM")); BOProductListPriceHistory response = mapper.MapEFToBO(entity); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ListPrice.Should().Be(1m); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ProductID.Should().Be(1); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); }