Exemple #1
0
 public static Offset Offset(this Limit limit, int offset)
 {
     return(new Offset(limit, offset));
 }
Exemple #2
0
        /// <summary>
        /// Selects on Limit
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="limit"></param>
        /// <param name="transaction"></param>
        /// <param name="ticket"></param>
        /// <returns></returns>
        public static async Task <IEnumerable <T> > SelectAsync <T>(this Limit limit, IDbTransaction transaction = null, ITicket ticket = null)
        {
            string sql = Select <T>(limit, ticket, true);

            return(await limit.Connection.QueryAsync <T>(sql : sql, transaction : transaction).ConfigureAwait(false));
        }
Exemple #3
0
 /// <summary>
 /// Selects on Limit
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="limit"></param>
 /// <param name="ticket"></param>
 /// <returns></returns>
 public static string SelectAsString <T>(this Limit limit, ITicket ticket = null)
 {
     return(Select <T>(limit, ticket, false));
 }
Exemple #4
0
        /// <summary>
        /// Selects on Limit
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="limit"></param>
        /// <param name="transaction"></param>
        /// <param name="ticket"></param>
        /// <returns></returns>
        public static IEnumerable <T> Select <T>(this Limit limit, IDbTransaction transaction = null, ITicket ticket = null)
        {
            string sql = Select <T>(limit, ticket, true);

            return(limit.Connection.Query <T>(sql: sql, transaction: transaction));
        }