Exemplo n.º 1
0
        /// <summary>
        /// Projects query to destanation query using projection configuration.
        /// </summary>
        /// <typeparam name="TDest">Destanation element type.</typeparam>
        /// <param name="configure">Projection configuration action.</param>
        /// <returns>Query of destanation elements.</returns>
        public IQueryable <TDest> To <TDest>(Action <QueryableMappingBuilder <TSource, TDest> > configure)
        {
            var factory = new QueryableFactory <TDest>();

            configure(new QueryableMappingBuilder <TSource, TDest>(_sourceQueryable, factory));

            return(factory.Create());
        }
Exemplo n.º 2
0
        internal QueryableWithParamMappingBuilder(IQueryable <TSource> sourceQueryable, QueryableFactory <TDest> queryableFactory, TParam param)
        {
            _sourceQueryable = sourceQueryable;
            QueryableFactory = queryableFactory;
            _param           = param;

            QueryableFactory.Create = GetQueryable;
        }