Esempio n. 1
0
    public void NullPropertyMap()
    {
        var definitions = new MapDefinitionCollection(() => new IMapDefinition[] { new MapperDefinition5() });
        var mapper      = new UmbracoMapper(definitions, _scopeProvider);

        var thing7 = new Thing7();

        var thing8 = mapper.Map <Thing7, Thing8>(thing7);

        Assert.IsNotNull(thing8);
        Assert.IsNull(thing8.Things);
    }
Esempio n. 2
0
 private void Map2(Thing7 source, Thing8 target, MapperContext context) =>
 target.Things = context.Map <IEnumerable <Thing2> >(source.Things);