Exemple #1
0
        /// <summary>Gets a builder for mapping a dictionary property.</summary>
        protected IDictionaryMap Dictionary <TReturnType>(Expression <Func <TEntity, TReturnType> > prop)
        {
            var dictionaryMap = new DictionaryMap(prop.ExtractPropertyInfo());

            MappedProperties.Add(dictionaryMap);
            return(dictionaryMap);
        }
Exemple #2
0
        /// <summary>Gets a builder for mapping a collection property.</summary>
        protected ICollectionMap Collection <TReturnType>(Expression <Func <TEntity, TReturnType> > prop)
        {
            var propertyMap = new CollectionMap(prop.ExtractPropertyInfo());

            MappedProperties.Add(propertyMap);
            return(propertyMap);
        }
        /// <summary>
        /// Register a class property as coming from the input datasource
        /// </summary>
        protected MappingInfo Map(Expression <Func <T, object> > propertyLambda)
        {
            var property = Extract(propertyLambda);

            var retval = new MappingInfo(property);

            MappedProperties.Add(retval);

            return(retval);
        }