public virtual PersonCreditCard MapBOToEF( BOPersonCreditCard bo) { PersonCreditCard efPersonCreditCard = new PersonCreditCard(); efPersonCreditCard.SetProperties( bo.BusinessEntityID, bo.CreditCardID, bo.ModifiedDate); return(efPersonCreditCard); }
public void MapEFToBO() { var mapper = new DALPersonCreditCardMapper(); PersonCreditCard entity = new PersonCreditCard(); entity.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM")); BOPersonCreditCard response = mapper.MapEFToBO(entity); response.BusinessEntityID.Should().Be(1); response.CreditCardID.Should().Be(1); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); }
public void MapEFToBOList() { var mapper = new DALPersonCreditCardMapper(); PersonCreditCard entity = new PersonCreditCard(); entity.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM")); List <BOPersonCreditCard> response = mapper.MapEFToBO(new List <PersonCreditCard>() { entity }); response.Count.Should().Be(1); }