OrmLiteReadExpressionsApiAsync
Assembly: ServiceStack.OrmLite.dll
View Source
public static class OrmLiteReadExpressionsApiAsync : object
Methods
SelectAsync<T>(IDbConnection, Expression<Func<T, Boolean>>, CancellationToken)
Returns results from using a LINQ Expression. E.g: <p>db.Select<Person>(x => x.Age > 40)</p>
View Source
public static Task<List<T>> SelectAsync<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
CancellationToken | token |
Type Parameters
T
SelectAsync<T>(IDbConnection, SqlExpression<T>, CancellationToken)
Returns results from using an SqlExpression lambda. E.g: <p>db.Select(db.From<Person>().Where(x => x.Age > 40))</p>
View Source
public static Task<List<T>> SelectAsync<T>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
SelectAsync<Into, From>(IDbConnection, SqlExpression<From>, CancellationToken)
Project results from a number of joined tables into a different model
View Source
public static Task<List<Into>> SelectAsync<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, CancellationToken token = null)
Returns
Task<List<<Into>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
Into
From
SelectAsync<T>(IDbConnection, ISqlExpression, CancellationToken)
Returns results from using an SqlExpression lambda. E.g: <p>db.SelectAsync(db.From<Person>().Where(x => x.Age > 40))</p>
View Source
public static Task<List<T>> SelectAsync<T>(this IDbConnection dbConn, ISqlExpression expression, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.ISqlExpression | expression |
CancellationToken | token |
Type Parameters
T
SelectMultiAsync<T, T2>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2>>> SelectMultiAsync<T, T2>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
SelectMultiAsync<T, T2, T3>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3>>> SelectMultiAsync<T, T2, T3>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
T3
SelectMultiAsync<T, T2, T3, T4>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4>>> SelectMultiAsync<T, T2, T3, T4>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
SelectMultiAsync<T, T2, T3, T4, T5>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5>>> SelectMultiAsync<T, T2, T3, T4, T5>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
SelectMultiAsync<T, T2, T3, T4, T5, T6>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5, T6>>> SelectMultiAsync<T, T2, T3, T4, T5, T6>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
T6
SelectMultiAsync<T, T2, T3, T4, T5, T6, T7>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5, T6, T7>>> SelectMultiAsync<T, T2, T3, T4, T5, T6, T7>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
T6
T7
SelectMultiAsync<T, T2, T3, T4, T5, T6, T7, T8>(IDbConnection, SqlExpression<T>, CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5, T6, T7, T8>>> SelectMultiAsync<T, T2, T3, T4, T5, T6, T7, T8>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>,<T8>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
T6
T7
T8
SelectMultiAsync<T, T2>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2>>> SelectMultiAsync<T, T2>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
SelectMultiAsync<T, T2, T3>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3>>> SelectMultiAsync<T, T2, T3>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
T3
SelectMultiAsync<T, T2, T3, T4>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4>>> SelectMultiAsync<T, T2, T3, T4>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
SelectMultiAsync<T, T2, T3, T4, T5>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5>>> SelectMultiAsync<T, T2, T3, T4, T5>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
SelectMultiAsync<T, T2, T3, T4, T5, T6>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5, T6>>> SelectMultiAsync<T, T2, T3, T4, T5, T6>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
T6
SelectMultiAsync<T, T2, T3, T4, T5, T6, T7>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5, T6, T7>>> SelectMultiAsync<T, T2, T3, T4, T5, T6, T7>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
T6
T7
SelectMultiAsync<T, T2, T3, T4, T5, T6, T7, T8>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
View Source
public static Task<List<Tuple<T, T2, T3, T4, T5, T6, T7, T8>>> SelectMultiAsync<T, T2, T3, T4, T5, T6, T7, T8>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects, CancellationToken token = null)
Returns
Task<List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>,<T8>>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
CancellationToken | token |
Type Parameters
T
T2
T3
T4
T5
T6
T7
T8
SingleAsync<T>(IDbConnection, Expression<Func<T, Boolean>>, CancellationToken)
Returns a single result from using a LINQ Expression. E.g: <p>db.Single<Person>(x => x.Age == 42)</p>
View Source
public static Task<T> SingleAsync<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate, CancellationToken token = null)
Returns
Task<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
CancellationToken | token |
Type Parameters
T
SingleAsync<T>(IDbConnection, SqlExpression<T>, CancellationToken)
Returns results from using an SqlExpression lambda. E.g: <p>db.SingleAsync<Person>(x => x.Age > 40)</p>
View Source
public static Task<T> SingleAsync<T>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
SingleAsync<T>(IDbConnection, ISqlExpression, CancellationToken)
Returns results from using an SqlExpression lambda. E.g: <p>db.SingleAsync(db.From<Person>().Where(x => x.Age > 40))</p>
View Source
public static Task<T> SingleAsync<T>(this IDbConnection dbConn, ISqlExpression expression, CancellationToken token = null)
Returns
Task<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.ISqlExpression | expression |
CancellationToken | token |
Type Parameters
T
ScalarAsync<T, TKey>(IDbConnection, Expression<Func<T, Object>>, CancellationToken)
Returns a scalar result from using an SqlExpression lambda. E.g: <p>db.Scalar<Person, int>(x => Sql.Max(x.Age))</p>
View Source
public static Task<TKey> ScalarAsync<T, TKey>(this IDbConnection dbConn, Expression<Func<T, object>> field, CancellationToken token = null)
Returns
Task<<TKey>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Object>> | field |
CancellationToken | token |
Type Parameters
T
TKey
ScalarAsync<T, TKey>(IDbConnection, Expression<Func<T, Object>>, Expression<Func<T, Boolean>>, CancellationToken)
Returns a scalar result from using an SqlExpression lambda. E.g: <p>db.Scalar<Person, int>(x => Sql.Max(x.Age), , x => x.Age < 50)</p>
View Source
public static Task<TKey> ScalarAsync<T, TKey>(this IDbConnection dbConn, Expression<Func<T, object>> field, Expression<Func<T, bool>> predicate, CancellationToken token = null)
Returns
Task<<TKey>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Object>> | field |
Expression<Func<<T>,System.Boolean>> | predicate |
CancellationToken | token |
Type Parameters
T
TKey
CountAsync<T>(IDbConnection, Expression<Func<T, Boolean>>, CancellationToken)
Returns the count of rows that match the LINQ expression, E.g: <p>db.Count<Person>(x => x.Age < 50)</p>
View Source
public static Task<long> CountAsync<T>(this IDbConnection dbConn, Expression<Func<T, bool>> expression, CancellationToken token = null)
Returns
Task<System.Int64>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | expression |
CancellationToken | token |
Type Parameters
T
CountAsync<T>(IDbConnection, SqlExpression<T>, CancellationToken)
Returns the count of rows that match the supplied SqlExpression, E.g: <p>db.Count(db.From<Person>().Where(x => x.Age < 50))</p>
View Source
public static Task<long> CountAsync<T>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<System.Int64>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
CountAsync<T>(IDbConnection, CancellationToken)
View Source
public static Task<long> CountAsync<T>(this IDbConnection dbConn, CancellationToken token = null)
Returns
Task<System.Int64>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
CancellationToken | token |
Type Parameters
T
RowCountAsync<T>(IDbConnection, SqlExpression<T>, CancellationToken)
Return the number of rows returned by the supplied expression
View Source
public static Task<long> RowCountAsync<T>(this IDbConnection dbConn, SqlExpression<T> expression, CancellationToken token = null)
Returns
Task<System.Int64>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
CancellationToken | token |
Type Parameters
T
RowCountAsync(IDbConnection, String, Object, CancellationToken)
Return the number of rows returned by the supplied sql
View Source
public static Task<long> RowCountAsync(this IDbConnection dbConn, string sql, object anonType = null, CancellationToken token = null)
Returns
Task<System.Int64>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
System.Object | anonType |
CancellationToken | token |
LoadSelectAsync<T>(IDbConnection, Expression<Func<T, Boolean>>, String[], CancellationToken)
Returns results with references from using a LINQ Expression. E.g: <p>db.LoadSelectAsync<Person>(x => x.Age > 40)</p>
View Source
public static Task<List<T>> LoadSelectAsync<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate, string[] include = null, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
System.String[] | include |
CancellationToken | token |
Type Parameters
T
LoadSelectAsync<T>(IDbConnection, Expression<Func<T, Boolean>>, Expression<Func<T, Object>>)
Returns results with references from using a LINQ Expression. E.g: <p>db.LoadSelectAsync<Person>(x => x.Age > 40, include: x => new { x.PrimaryAddress })</p>
View Source
public static Task<List<T>> LoadSelectAsync<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate, Expression<Func<T, object>> include)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
Expression<Func<<T>,System.Object>> | include |
Type Parameters
T
LoadSelectAsync<T>(IDbConnection, SqlExpression<T>, String[], CancellationToken)
Returns results with references from using an SqlExpression lambda. E.g: <p>db.LoadSelectAsync(db.From<Person>().Where(x => x.Age > 40))</p>
View Source
public static Task<List<T>> LoadSelectAsync<T>(this IDbConnection dbConn, SqlExpression<T> expression, string[] include = null, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | include |
CancellationToken | token |
Type Parameters
T
LoadSelectAsync<T>(IDbConnection, SqlExpression<T>, IEnumerable<String>, CancellationToken)
Returns results with references from using an SqlExpression lambda. E.g: <p>db.LoadSelectAsync(db.From<Person>().Where(x => x.Age > 40), include:q.OnlyFields)</p>
View Source
public static Task<List<T>> LoadSelectAsync<T>(this IDbConnection dbConn, SqlExpression<T> expression, IEnumerable<string> include, CancellationToken token = null)
Returns
Task<List<<T>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
IEnumerable<System.String> | include |
CancellationToken | token |
Type Parameters
T
LoadSelectAsync<Into, From>(IDbConnection, SqlExpression<From>, String[], CancellationToken)
Project results with references from a number of joined tables into a different model
View Source
public static Task<List<Into>> LoadSelectAsync<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, string[] include = null, CancellationToken token = null)
Returns
Task<List<<Into>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | include |
CancellationToken | token |
Type Parameters
Into
From
LoadSelectAsync<Into, From>(IDbConnection, SqlExpression<From>, IEnumerable<String>, CancellationToken)
Project results with references from a number of joined tables into a different model
View Source
public static Task<List<Into>> LoadSelectAsync<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, IEnumerable<string> include, CancellationToken token = null)
Returns
Task<List<<Into>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
IEnumerable<System.String> | include |
CancellationToken | token |
Type Parameters
Into
From
LoadSelectAsync<Into, From>(IDbConnection, SqlExpression<From>, Expression<Func<Into, Object>>)
Project results with references from a number of joined tables into a different model
View Source
public static Task<List<Into>> LoadSelectAsync<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, Expression<Func<Into, object>> include)
Returns
Task<List<<Into>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Expression<Func<<Into>,System.Object>> | include |
Type Parameters
Into
From
GetSchemaTableAsync(IDbConnection, String, CancellationToken)
Return ADO.NET reader.GetSchemaTable() in a DataTable
View Source
public static Task<DataTable> GetSchemaTableAsync(this IDbConnection dbConn, string sql, CancellationToken token = null)
Returns
Task<DataTable>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
CancellationToken | token |
GetTableColumnsAsync<T>(IDbConnection, CancellationToken)
Get Table Column Schemas for specified table
View Source
public static Task<ColumnSchema[]> GetTableColumnsAsync<T>(this IDbConnection dbConn, CancellationToken token = null)
Returns
Task<ServiceStack.OrmLite.ColumnSchema[]>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
CancellationToken | token |
Type Parameters
T
GetTableColumnsAsync(IDbConnection, Type, CancellationToken)
Get Table Column Schemas for specified table
View Source
public static Task<ColumnSchema[]> GetTableColumnsAsync(this IDbConnection dbConn, Type type, CancellationToken token = null)
Returns
Task<ServiceStack.OrmLite.ColumnSchema[]>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Type | type |
CancellationToken | token |
GetTableColumnsAsync(IDbConnection, String, CancellationToken)
Get Table Column Schemas for result-set return from specified sql
View Source
public static Task<ColumnSchema[]> GetTableColumnsAsync(this IDbConnection dbConn, string sql, CancellationToken token = null)
Returns
Task<ServiceStack.OrmLite.ColumnSchema[]>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
CancellationToken | token |
EnableForeignKeysCheckAsync(IDbConnection, CancellationToken)
View Source
public static Task EnableForeignKeysCheckAsync(this IDbConnection dbConn, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
CancellationToken | token |
DisableForeignKeysCheckAsync(IDbConnection, CancellationToken)
View Source
public static Task DisableForeignKeysCheckAsync(this IDbConnection dbConn, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
CancellationToken | token |