public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder)
        {
            IEntityMap <TEntityValue> entityMap = builder.GetEntityMap <TEntityValue>();

            var mapper = new SingleSliceValueEntityProperty <TEntity, TEntityValue>(builder.ImplementationType, Property.Name, Position, x => Factory(x, entityMap));

            ITextSliceProvider <TEntity> provider = new EntityValueSliceProvider <TEntity, TEntityValue>(Property, entityMap);

            builder.Add(mapper, provider);
        }
Esempio n. 2
0
        public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder)
        {
            IEntityMap <TEntityValue> entityMap = builder.GetEntityMap <TEntityValue>();

            var property = new ValueListEntityProperty <TEntity, TEntityValue>(builder.ImplementationType, Property.Name, Position,
                                                                               x => new EntityValueList <TEntityValue>(x, entityMap), _sliceFactory);

            ITextSliceProvider <TEntity> provider = new ValueListSliceProvider <TEntity, TEntityValue>(Property, new EntityValueFormatter <TEntityValue>(entityMap));

            builder.Add(property, provider);
        }