예제 #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);
        }
예제 #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);
        }
예제 #3
0
        /// <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);
        }