public void MapEntityToModelList() { var mapper = new DALVPersonMapper(); VPerson item = new VPerson(); item.SetProperties(1, "A"); List<ApiVPersonServerResponseModel> response = mapper.MapEntityToModel(new List<VPerson>() { { item} }); response.Count.Should().Be(1); }
public virtual VPerson MapBOToEF( BOVPerson bo) { VPerson efVPerson = new VPerson(); efVPerson.SetProperties( bo.PersonId, bo.PersonName); return(efVPerson); }
public void MapEntityToModel() { var mapper = new DALVPersonMapper(); VPerson item = new VPerson(); item.SetProperties(1, "A"); ApiVPersonServerResponseModel response = mapper.MapEntityToModel(item); response.PersonId.Should().Be(1); response.PersonName.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALVPersonMapper(); VPerson entity = new VPerson(); entity.SetProperties(1, "A"); BOVPerson response = mapper.MapEFToBO(entity); response.PersonId.Should().Be(1); response.PersonName.Should().Be("A"); }
public virtual VPerson MapModelToEntity( int personId, ApiVPersonServerRequestModel model ) { VPerson item = new VPerson(); item.SetProperties( personId, model.PersonName); return(item); }
public void MapEFToBOList() { var mapper = new DALVPersonMapper(); VPerson entity = new VPerson(); entity.SetProperties(1, "A"); List <BOVPerson> response = mapper.MapEFToBO(new List <VPerson>() { entity }); response.Count.Should().Be(1); }