Пример #1
0
        static SqlSelectBuilder <TRet, TRet, object> InternalOnMap <T1, T2, TRet>(this IBaseLeftRightJoinOnAble <T1, T2> items, Expression <Func <T1, T2, TRet> > map, Expression <Func <TRet, bool> > on)
        {
            var it = new SqlJoin(items.Left.Clause.From, items.Right, map, on, items.Type, items.Lateral);

            return(new SqlSelectBuilder <TRet, TRet, object>(SelectClause.InitFromItem <TRet>(it)));
        }
Пример #2
0
        /// <summary>
        /// Renombra los elementos de un JOIN, esto para que sea más claro su uso en el SELECT
        /// </summary>
        public static ISqlNextJoinAble <TOut, TOut, object> Alias <TIn, TOut>(this ISqlNextJoinAble <TIn, TIn, object> from, Expression <Func <TIn, TOut> > map)
        {
            var it = new FromListAlias(from.Clause.From, map);

            return(new SqlSelectBuilder <TOut, TOut, object>(SelectClause.InitFromItem <TOut>(it)));
        }
Пример #3
0
 /// <summary>
 /// Inicia un query con un FROM dado el destino del from
 /// </summary>
 /// <param name="from">Destino del FROM, puede ser un <see cref="SqlTable"/> o un subquery  </param>
 public static ISqlFirstJoinAble <T1, T1, object> From <T1>(IFromListItemTarget <T1> from) =>
 new SqlSelectBuilder <T1, T1, object>(SelectClause.InitFromItem <T1>(new SqlFrom <T1>(from)));