DBContext
Contains data layer methods providing everything needed in order to properly execute CRUD operations.
Gets database name out of database context.
Gets a database server name.
Initializes a new instance of the DBContext class.
Starts a database transaction.
Tries to cancel the execution of a SQL command.
Commits a database transaction.
Executes a Transact-SQL statement against the connection and returns the number of rows affected.
Executes a Transact-SQL statement against the connection and returns the number of rows affected.
public DbDataReader ExecuteProcedureAsReader(string procedureName, IEnumerable<SqlParameter> parameters)
Executes a stored procedure against the connection and builds a DbDataReader.
Executes a stored procedure against the connection and returns the number of rows affected.
Executes a Transact-SQL statement against the connection and returns an in-memory cache of data.
public DataSet ExecuteSqlStatementAsDataSet(string sqlStatement, IEnumerable<SqlParameter> parameters)
Executes a parameterized Transact-SQL statement against the connection and returns an in-memory cache of data.
Returns DataTable object as a result of SQL statement execution.
public DataTable ExecuteSqlStatementAsDataTable(string sqlStatement, IEnumerable<SqlParameter> parameters)
Returns DataTable object as a result of parameterized SQL statement execution.
public DbDataReader ExecuteSqlStatementAsDbDataReader(string sqlStatement, IEnumerable<DbParameter> parameters)
Executes a Transact-SQL statement against the connection and build a DbDataReader.
Executes a Transact-SQL statement against the connection and builds a DbDataReader.
Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
Gets a database connection.
Gets a current database transaction.
Releases a database connection.
Rollbacks a database transaction.