public static Offset Offset(this Limit limit, int offset) { return(new Offset(limit, offset)); }
/// <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)); }
/// <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)); }
/// <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)); }