Class QueryExectionExtensions
Inheritance
QueryExectionExtensions
Assembly: SoDataBase.dll
Syntax
public static class QueryExectionExtensions
Methods
ExecuteNonQuery(SqlCommand)
Declaration
public static int ExecuteNonQuery(this SqlCommand command)
Parameters
Returns
ExecuteReader(SqlCommand, bool)
Execute a SELECT statement against the database and return the results as an IEnumerable, suitable for linq expressions and iteration.
But please DON'T use the anti-pattern 'fetch everything then post-filter using Linq'; put all the restrictions you can
into the select before Fetch'ing the results.
Declaration
public static IEnumerable<ISoDataRecord> ExecuteReader(this SqlCommand command, bool ignoreSentry = false)
Parameters
Type |
Name |
Description |
SqlCommand |
command |
An SqlCommand that is a select
|
bool |
ignoreSentry |
|
Returns
Type |
Description |
IEnumerable<ISoDataRecord> |
Enumerable result, which contains FieldInfo-based Get methods for all common data types
|
ExecuteScalar<T>(SqlCommand)
Declaration
public static T ExecuteScalar<T>(this SqlCommand command)
Parameters
Returns
Type Parameters
ExecuteScalar<T>(SqlCommand, bool)
Declaration
public static T ExecuteScalar<T>(this SqlCommand command, bool ignoreSentry)
Parameters
Returns
Type Parameters
GetFieldPropertyRead(QueryExecutionHelper, FieldInfo)
Declaration
public static FieldProperty GetFieldPropertyRead(this QueryExecutionHelper qeh, FieldInfo field)
Parameters
Returns