OrmLiteReadExpressionsApi
Assembly: ServiceStack.OrmLite.dll
View Source
public static class OrmLiteReadExpressionsApi : object
Methods
Exec<T>(IDbConnection, Func<IDbCommand, T>)
View Source
public static T Exec<T>(this IDbConnection dbConn, Func<IDbCommand, T> filter)
Returns
<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Func<IDbCommand,<T>> | filter |
Type Parameters
T
Exec(IDbConnection, Action<IDbCommand>)
View Source
public static void Exec(this IDbConnection dbConn, Action<IDbCommand> filter)
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Action<IDbCommand> | filter |
Exec<T>(IDbConnection, Func<IDbCommand, Task<T>>)
View Source
public static Task<T> Exec<T>(this IDbConnection dbConn, Func<IDbCommand, Task<T>> filter)
Returns
Task<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Func<IDbCommand,Task<<T>>> | filter |
Type Parameters
T
Exec(IDbConnection, Func<IDbCommand, Task>)
View Source
public static Task Exec(this IDbConnection dbConn, Func<IDbCommand, Task> filter)
Returns
Task
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Func<IDbCommand,Task> | filter |
ExecLazy<T>(IDbConnection, Func<IDbCommand, IEnumerable<T>>)
View Source
public static IEnumerable<T> ExecLazy<T>(this IDbConnection dbConn, Func<IDbCommand, IEnumerable<T>> filter)
Returns
IEnumerable<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Func<IDbCommand,IEnumerable<<T>>> | filter |
Type Parameters
T
Exec(IDbConnection, Func<IDbCommand, IDbCommand>)
View Source
public static IDbCommand Exec(this IDbConnection dbConn, Func<IDbCommand, IDbCommand> filter)
Returns
IDbCommand
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Func<IDbCommand,IDbCommand> | filter |
Exec(IDbConnection, Func<IDbCommand, Task<IDbCommand>>)
View Source
public static Task<IDbCommand> Exec(this IDbConnection dbConn, Func<IDbCommand, Task<IDbCommand>> filter)
Returns
Task<IDbCommand>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Func<IDbCommand,Task<IDbCommand>> | filter |
From<T>(IDbConnection)
Creates a new SqlExpression builder allowing typed LINQ-like queries. Alias for SqlExpression.
View Source
public static SqlExpression<T> From<T>(this IDbConnection dbConn)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Type Parameters
T
From<T>(IDbConnection, Action<SqlExpression<T>>)
View Source
public static SqlExpression<T> From<T>(this IDbConnection dbConn, Action<SqlExpression<T>> options)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Action<ServiceStack.OrmLite.SqlExpression<<T>>> | options |
Type Parameters
T
From<T, JoinWith>(IDbConnection, Expression<Func<T, JoinWith, Boolean>>)
View Source
public static SqlExpression<T> From<T, JoinWith>(this IDbConnection dbConn, Expression<Func<T, JoinWith, bool>> joinExpr = null)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,<JoinWith>,System.Boolean>> | joinExpr |
Type Parameters
T
JoinWith
From<T>(IDbConnection, String)
Creates a new SqlExpression builder for the specified type using a user-defined FROM sql expression.
View Source
public static SqlExpression<T> From<T>(this IDbConnection dbConn, string fromExpression)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | fromExpression |
Type Parameters
T
From<T>(IDbConnection, TableOptions)
View Source
public static SqlExpression<T> From<T>(this IDbConnection dbConn, TableOptions tableOptions)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.TableOptions | tableOptions |
Type Parameters
T
TagWith<T>(SqlExpression<T>, String)
View Source
public static SqlExpression<T> TagWith<T>(this SqlExpression<T> expression, string tag)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String | tag |
Type Parameters
T
TagWithCallSite<T>(SqlExpression<T>, String, Int32)
View Source
public static SqlExpression<T> TagWithCallSite<T>(this SqlExpression<T> expression, string filePath = null, int lineNumber = 0)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String | filePath |
System.Int32 | lineNumber |
Type Parameters
T
From<T>(IDbConnection, TableOptions, Action<SqlExpression<T>>)
View Source
public static SqlExpression<T> From<T>(this IDbConnection dbConn, TableOptions tableOptions, Action<SqlExpression<T>> options)
Returns
ServiceStack.OrmLite.SqlExpression<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.TableOptions | tableOptions |
Action<ServiceStack.OrmLite.SqlExpression<<T>>> | options |
Type Parameters
T
JoinAlias(IDbConnection, String)
View Source
public static JoinFormatDelegate JoinAlias(this IDbConnection db, string alias)
Returns
ServiceStack.OrmLite.JoinFormatDelegate
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.String | alias |
TableAlias(IDbConnection, String)
View Source
public static TableOptions TableAlias(this IDbConnection db, string alias)
Returns
ServiceStack.OrmLite.TableOptions
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.String | alias |
GetTableName<T>(IDbConnection)
View Source
public static string GetTableName<T>(this IDbConnection db)
Returns
System.String
Parameters
Type | Name |
---|---|
IDbConnection | db |
Type Parameters
T
GetTableNames(IDbConnection)
View Source
public static List<string> GetTableNames(this IDbConnection db)
Returns
List<System.String>
Parameters
Type | Name |
---|---|
IDbConnection | db |
GetTableNames(IDbConnection, String)
View Source
public static List<string> GetTableNames(this IDbConnection db, string schema)
Returns
List<System.String>
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.String | schema |
GetTableNamesAsync(IDbConnection)
View Source
public static Task<List<string>> GetTableNamesAsync(this IDbConnection db)
Returns
Task<List<System.String>>
Parameters
Type | Name |
---|---|
IDbConnection | db |
GetTableNamesAsync(IDbConnection, String)
View Source
public static Task<List<string>> GetTableNamesAsync(this IDbConnection db, string schema)
Returns
Task<List<System.String>>
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.String | schema |
GetTableNamesWithRowCounts(IDbConnection, Boolean, String)
View Source
public static List<KeyValuePair<string, long>> GetTableNamesWithRowCounts(this IDbConnection db, bool live = false, string schema = null)
Returns
List<KeyValuePair<System.String,System.Int64>>
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.Boolean | live |
System.String | schema |
GetTableNamesWithRowCountsAsync(IDbConnection, Boolean, String)
View Source
public static async Task<List<KeyValuePair<string, long>>> GetTableNamesWithRowCountsAsync(this IDbConnection db, bool live = false, string schema = null)
Returns
Task<List<KeyValuePair<System.String,System.Int64>>>
Parameters
Type | Name |
---|---|
IDbConnection | db |
System.Boolean | live |
System.String | schema |
GetQuotedTableName<T>(IDbConnection)
View Source
public static string GetQuotedTableName<T>(this IDbConnection db)
Returns
System.String
Parameters
Type | Name |
---|---|
IDbConnection | db |
Type Parameters
T
OpenTransaction(IDbConnection)
Open a Transaction in OrmLite
View Source
public static IDbTransaction OpenTransaction(this IDbConnection dbConn)
Returns
IDbTransaction
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
OpenTransactionIfNotExists(IDbConnection)
Returns a new transaction if not yet exists, otherwise null
View Source
public static IDbTransaction OpenTransactionIfNotExists(this IDbConnection dbConn)
Returns
IDbTransaction
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
OpenTransaction(IDbConnection, IsolationLevel)
Open a Transaction in OrmLite
View Source
public static IDbTransaction OpenTransaction(this IDbConnection dbConn, IsolationLevel isolationLevel)
Returns
IDbTransaction
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
IsolationLevel | isolationLevel |
OpenTransactionIfNotExists(IDbConnection, IsolationLevel)
Returns a new transaction if not yet exists, otherwise null
View Source
public static IDbTransaction OpenTransactionIfNotExists(this IDbConnection dbConn, IsolationLevel isolationLevel)
Returns
IDbTransaction
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
IsolationLevel | isolationLevel |
OpenCommand(IDbConnection)
Create a managed OrmLite IDbCommand
View Source
public static IDbCommand OpenCommand(this IDbConnection dbConn)
Returns
IDbCommand
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Select<T>(IDbConnection, Expression<Func<T, Boolean>>)
Returns results from using a LINQ Expression. E.g: <p>db.Select<Person>(x => x.Age > 40)</p>
View Source
public static List<T> Select<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
Type Parameters
T
Select<T>(IDbConnection, SqlExpression<T>)
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 List<T> Select<T>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
Select<T>(IDbConnection, ISqlExpression, Object)
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 List<T> Select<T>(this IDbConnection dbConn, ISqlExpression expression, object anonType = null)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.ISqlExpression | expression |
System.Object | anonType |
Type Parameters
T
SelectMulti<T, T2>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2>> SelectMulti<T, T2>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
SelectMulti<T, T2, T3>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2, T3>> SelectMulti<T, T2, T3>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>,<T3>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
T3
SelectMulti<T, T2, T3, T4>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2, T3, T4>> SelectMulti<T, T2, T3, T4>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
T3
T4
SelectMulti<T, T2, T3, T4, T5>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2, T3, T4, T5>> SelectMulti<T, T2, T3, T4, T5>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
T3
T4
T5
SelectMulti<T, T2, T3, T4, T5, T6>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2, T3, T4, T5, T6>> SelectMulti<T, T2, T3, T4, T5, T6>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
T3
T4
T5
T6
SelectMulti<T, T2, T3, T4, T5, T6, T7>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2, T3, T4, T5, T6, T7>> SelectMulti<T, T2, T3, T4, T5, T6, T7>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
T3
T4
T5
T6
T7
SelectMulti<T, T2, T3, T4, T5, T6, T7, T8>(IDbConnection, SqlExpression<T>)
View Source
public static List<Tuple<T, T2, T3, T4, T5, T6, T7, T8>> SelectMulti<T, T2, T3, T4, T5, T6, T7, T8>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>,<T8>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
T2
T3
T4
T5
T6
T7
T8
SelectMulti<T, T2>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2>> SelectMulti<T, T2>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
SelectMulti<T, T2, T3>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2, T3>> SelectMulti<T, T2, T3>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>,<T3>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
T3
SelectMulti<T, T2, T3, T4>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2, T3, T4>> SelectMulti<T, T2, T3, T4>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
T3
T4
SelectMulti<T, T2, T3, T4, T5>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2, T3, T4, T5>> SelectMulti<T, T2, T3, T4, T5>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
T3
T4
T5
SelectMulti<T, T2, T3, T4, T5, T6>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2, T3, T4, T5, T6>> SelectMulti<T, T2, T3, T4, T5, T6>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
T3
T4
T5
T6
SelectMulti<T, T2, T3, T4, T5, T6, T7>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2, T3, T4, T5, T6, T7>> SelectMulti<T, T2, T3, T4, T5, T6, T7>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
T3
T4
T5
T6
T7
SelectMulti<T, T2, T3, T4, T5, T6, T7, T8>(IDbConnection, SqlExpression<T>, String[])
View Source
public static List<Tuple<T, T2, T3, T4, T5, T6, T7, T8>> SelectMulti<T, T2, T3, T4, T5, T6, T7, T8>(this IDbConnection dbConn, SqlExpression<T> expression, string[] tableSelects)
Returns
List<Tuple<<T>,<T2>,<T3>,<T4>,<T5>,<T6>,<T7>,<T8>>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | tableSelects |
Type Parameters
T
T2
T3
T4
T5
T6
T7
T8
Single<T>(IDbConnection, Expression<Func<T, Boolean>>)
Returns a single result from using a LINQ Expression. E.g: <p>db.Single<Person>(x => x.Age == 42)</p>
View Source
public static T Single<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate)
Returns
<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
Type Parameters
T
Single<T>(IDbConnection, SqlExpression<T>)
Returns results from using an SqlExpression lambda. E.g: <p>db.Select<Person>(x => x.Age > 40)</p>
View Source
public static T Single<T>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
Single<T>(IDbConnection, ISqlExpression)
Returns results from using an SqlExpression lambda. E.g: <p>db.Single(db.From<Person>().Where(x => x.Age > 40))</p>
View Source
public static T Single<T>(this IDbConnection dbConn, ISqlExpression expression)
Returns
<T>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.ISqlExpression | expression |
Type Parameters
T
Scalar<T, TKey>(IDbConnection, Expression<Func<T, Object>>)
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 TKey Scalar<T, TKey>(this IDbConnection dbConn, Expression<Func<T, object>> field)
Returns
<TKey>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Object>> | field |
Type Parameters
T
TKey
Scalar<T, TKey>(IDbConnection, Expression<Func<T, Object>>, Expression<Func<T, Boolean>>)
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 TKey Scalar<T, TKey>(this IDbConnection dbConn, Expression<Func<T, object>> field, Expression<Func<T, bool>> predicate)
Returns
<TKey>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Object>> | field |
Expression<Func<<T>,System.Boolean>> | predicate |
Type Parameters
T
TKey
Count<T>(IDbConnection, Expression<Func<T, Boolean>>)
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 long Count<T>(this IDbConnection dbConn, Expression<Func<T, bool>> expression)
Returns
System.Int64
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | expression |
Type Parameters
T
Count<T>(IDbConnection, SqlExpression<T>)
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 long Count<T>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
System.Int64
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
Count<T>(IDbConnection)
View Source
public static long Count<T>(this IDbConnection dbConn)
Returns
System.Int64
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Type Parameters
T
RowCount<T>(IDbConnection, SqlExpression<T>)
Return the number of rows returned by the supplied expression
View Source
public static long RowCount<T>(this IDbConnection dbConn, SqlExpression<T> expression)
Returns
System.Int64
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Type Parameters
T
RowCount(IDbConnection, String, Object)
Return the number of rows returned by the supplied sql
View Source
public static long RowCount(this IDbConnection dbConn, string sql, object anonType = null)
Returns
System.Int64
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
System.Object | anonType |
RowCount(IDbConnection, String, IEnumerable<IDbDataParameter>)
Return the number of rows returned by the supplied sql and db params
View Source
public static long RowCount(this IDbConnection dbConn, string sql, IEnumerable<IDbDataParameter> sqlParams)
Returns
System.Int64
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
IEnumerable<IDbDataParameter> | sqlParams |
LoadSelect<T>(IDbConnection, Expression<Func<T, Boolean>>, String[])
Returns results with references from using a LINQ Expression. E.g: <p>db.LoadSelect<Person>(x => x.Age > 40)</p>
View Source
public static List<T> LoadSelect<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate, string[] include = null)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
System.String[] | include |
Type Parameters
T
LoadSelect<T>(IDbConnection, Expression<Func<T, Boolean>>, Expression<Func<T, Object>>)
Returns results with references from using a LINQ Expression. E.g: <p>db.LoadSelect<Person>(x => x.Age > 40, include: x => new { x.PrimaryAddress })</p>
View Source
public static List<T> LoadSelect<T>(this IDbConnection dbConn, Expression<Func<T, bool>> predicate, Expression<Func<T, object>> include)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Expression<Func<<T>,System.Boolean>> | predicate |
Expression<Func<<T>,System.Object>> | include |
Type Parameters
T
LoadSelect<T>(IDbConnection, SqlExpression<T>, String[])
Returns results with references from using an SqlExpression lambda. E.g: <p>db.LoadSelect(db.From<Person>().Where(x => x.Age > 40))</p>
View Source
public static List<T> LoadSelect<T>(this IDbConnection dbConn, SqlExpression<T> expression = null, string[] include = null)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | include |
Type Parameters
T
LoadSelect<T>(IDbConnection, SqlExpression<T>, IEnumerable<String>)
Returns results with references from using an SqlExpression lambda. E.g: <p>db.LoadSelect(db.From<Person>().Where(x => x.Age > 40), include:q.OnlyFields)</p>
View Source
public static List<T> LoadSelect<T>(this IDbConnection dbConn, SqlExpression<T> expression, IEnumerable<string> include)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
IEnumerable<System.String> | include |
Type Parameters
T
LoadSelect<T>(IDbConnection, SqlExpression<T>, Expression<Func<T, Object>>)
Returns results with references from using an SqlExpression lambda. E.g: <p>db.LoadSelect(db.From<Person>().Where(x => x.Age > 40), include: x => new { x.PrimaryAddress })</p>
View Source
public static List<T> LoadSelect<T>(this IDbConnection dbConn, SqlExpression<T> expression, Expression<Func<T, object>> include)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Expression<Func<<T>,System.Object>> | include |
Type Parameters
T
LoadSelect<Into, From>(IDbConnection, SqlExpression<From>, String[])
Project results with references from a number of joined tables into a different model
View Source
public static List<Into> LoadSelect<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, string[] include = null)
Returns
List<<Into>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
System.String[] | include |
Type Parameters
Into
From
LoadSelect<Into, From>(IDbConnection, SqlExpression<From>, IEnumerable<String>)
Project results with references from a number of joined tables into a different model
View Source
public static List<Into> LoadSelect<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, IEnumerable<string> include)
Returns
List<<Into>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
IEnumerable<System.String> | include |
Type Parameters
Into
From
LoadSelect<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 List<Into> LoadSelect<Into, From>(this IDbConnection dbConn, SqlExpression<From> expression, Expression<Func<Into, object>> include)
Returns
List<<Into>>
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
ServiceStack.OrmLite.SqlExpression<T> | expression |
Expression<Func<<Into>,System.Object>> | include |
Type Parameters
Into
From
GetSchemaTable(IDbConnection, String)
Return ADO.NET reader.GetSchemaTable() in a DataTable
View Source
public static DataTable GetSchemaTable(this IDbConnection dbConn, string sql)
Returns
DataTable
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
GetTableColumns<T>(IDbConnection)
Get Table Column Schemas for specified table
View Source
public static ColumnSchema[] GetTableColumns<T>(this IDbConnection dbConn)
Returns
ServiceStack.OrmLite.ColumnSchema[]
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Type Parameters
T
GetTableColumns(IDbConnection, Type)
Get Table Column Schemas for specified table
View Source
public static ColumnSchema[] GetTableColumns(this IDbConnection dbConn, Type type)
Returns
ServiceStack.OrmLite.ColumnSchema[]
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
Type | type |
GetTableColumns(IDbConnection, String)
Get Table Column Schemas for result-set return from specified sql
View Source
public static ColumnSchema[] GetTableColumns(this IDbConnection dbConn, string sql)
Returns
ServiceStack.OrmLite.ColumnSchema[]
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
System.String | sql |
EnableForeignKeysCheck(IDbConnection)
View Source
public static void EnableForeignKeysCheck(this IDbConnection dbConn)
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |
DisableForeignKeysCheck(IDbConnection)
View Source
public static void DisableForeignKeysCheck(this IDbConnection dbConn)
Parameters
Type | Name |
---|---|
IDbConnection | dbConn |