コード例 #1
0
ファイル: Jaunty.Select.cs プロジェクト: sbeparey/Jaunty
 public static Join InnerJoin <T>(this JoinOn joinOn, string alias = null)
 {
     return(new Join(joinOn, GetType(typeof(T)), alias));
 }
コード例 #2
0
ファイル: Jaunty.Select.cs プロジェクト: sbeparey/Jaunty
 /// <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));
 }
コード例 #3
0
ファイル: Jaunty.Select.cs プロジェクト: sbeparey/Jaunty
        /// <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));
        }
コード例 #4
0
ファイル: Jaunty.Select.cs プロジェクト: sbeparey/Jaunty
        /// <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));
        }
コード例 #5
0
 public static Condition Where <T>(this JoinOn joinOnClause, Expression <Func <T, bool> > expression, IDbTransaction transaction = null)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public static Condition Where <T>(this JoinOn join, string column, T value)
 {
     return(GetCondition(join, column, ComparisonOperator.EqualTo, value));
 }