public virtual Clasp MapBOToEF( BOClasp bo) { Clasp efClasp = new Clasp(); efClasp.SetProperties( bo.Id, bo.NextChainId, bo.PreviousChainId); return(efClasp); }
public void MapEntityToModel() { var mapper = new DALClaspMapper(); Clasp item = new Clasp(); item.SetProperties(1, 1, 1); ApiClaspServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.NextChainId.Should().Be(1); response.PreviousChainId.Should().Be(1); }
public void MapEntityToModelList() { var mapper = new DALClaspMapper(); Clasp item = new Clasp(); item.SetProperties(1, 1, 1); List <ApiClaspServerResponseModel> response = mapper.MapEntityToModel(new List <Clasp>() { { item } }); response.Count.Should().Be(1); }
public virtual Clasp MapModelToEntity( int id, ApiClaspServerRequestModel model ) { Clasp item = new Clasp(); item.SetProperties( id, model.NextChainId, model.PreviousChainId); return(item); }
public void MapEFToBO() { var mapper = new DALClaspMapper(); Clasp entity = new Clasp(); entity.SetProperties(1, 1, 1); BOClasp response = mapper.MapEFToBO(entity); response.Id.Should().Be(1); response.NextChainId.Should().Be(1); response.PreviousChainId.Should().Be(1); }
public void MapEFToBOList() { var mapper = new DALClaspMapper(); Clasp entity = new Clasp(); entity.SetProperties(1, 1, 1); List <BOClasp> response = mapper.MapEFToBO(new List <Clasp>() { entity }); response.Count.Should().Be(1); }