public virtual TagSet MapBOToEF( BOTagSet bo) { TagSet efTagSet = new TagSet(); efTagSet.SetProperties( bo.DataVersion, bo.Id, bo.JSON, bo.Name, bo.SortOrder); return(efTagSet); }
public void MapEFToBOList() { var mapper = new DALTagSetMapper(); TagSet entity = new TagSet(); entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", 1); List <BOTagSet> response = mapper.MapEFToBO(new List <TagSet>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALTagSetMapper(); TagSet entity = new TagSet(); entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", 1); BOTagSet response = mapper.MapEFToBO(entity); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }