Ejemplo n.º 1
0
 public static Join InnerJoin <T>(this JoinOn joinOn, string alias = null)
 {
     return(new Join(joinOn, GetType(typeof(T)), alias));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Selects on From
 /// </summary>
 /// <typeparam name="T">The type representing the database table or view.</typeparam>
 /// <param name="joinOn">JoinOn<T></param>
 /// <returns>Returns <see cref="string"/></returns>
 public static string SelectAsString <T>(this JoinOn joinOn, ITicket ticket = null)
 {
     return(Select <T>(joinOn, ticket, true));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Selects on Join asynchronously
        /// </summary>
        /// <typeparam name="T">The type representing the database table or view.</typeparam>
        /// <param name="joinOn">InnerJoin<T> or LeftOuterJoin<T> or RightOuterJoin<T></param>
        /// <param name="ticket">An ITicket to uniquely id the query.</param>
        /// <param name="transaction">The transaction (optional).</param>
        /// <returns>Returns <see cref="IEnumerable{T}"/></returns>
        public static async Task <IEnumerable <T> > SelectAsync <T>(this JoinOn joinOn, IDbTransaction transaction = null, ITicket ticket = null)
        {
            string sql = Select <T>(joinOn, ticket, true);

            return(await joinOn.Connection.QueryAsync <T>(sql, transaction : transaction).ConfigureAwait(false));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Selects on Join
        /// </summary>
        /// <typeparam name="T">The type representing the database table or view.</typeparam>
        /// <param name="joinOn">InnerJoin<T> or LeftOuterJoin<T> or RightOuterJoin<T></param>
        /// <param name="transaction">The transaction (optional).</param>
        /// <param name="ticket">An ITicket to uniquely id the query.</param>
        /// <returns>Returns <see cref="IEnumerable{T}"/></returns>
        public static IEnumerable <T> Select <T>(this JoinOn joinOn, IDbTransaction transaction = null, ITicket ticket = null)
        {
            string sql = Select <T>(joinOn, ticket, true);

            return(joinOn.Connection.Query <T>(sql, transaction: transaction));
        }
Ejemplo n.º 5
0
 public static Condition Where <T>(this JoinOn joinOnClause, Expression <Func <T, bool> > expression, IDbTransaction transaction = null)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 6
0
 public static Condition Where <T>(this JoinOn join, string column, T value)
 {
     return(GetCondition(join, column, ComparisonOperator.EqualTo, value));
 }