<PackageReference Include="Relativity.Server.CustomPages.SDK" Version="5000.0.2" />

DBContext

public class DBContext : IDBContext
Contains data layer methods providing everything needed in order to properly execute CRUD operations.
public string Database { get; }

Gets database name out of database context.

public string ServerName { get; }

Gets a database server name.

public DBContext(BaseContext context)

Initializes a new instance of the DBContext class.

public void BeginTransaction()

Starts a database transaction.

public void Cancel()

Tries to cancel the execution of a SQL command.

public void CommitTransaction()

Commits a database transaction.

public int ExecuteNonQuerySQLStatement(string sqlStatement)

Executes a Transact-SQL statement against the connection and returns the number of rows affected.

public int ExecuteNonQuerySQLStatement(string sqlStatement, IEnumerable<SqlParameter> parameters)

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.

public int ExecuteProcedureNonQuery(string procedureName, IEnumerable<SqlParameter> parameters)

Executes a stored procedure against the connection and returns the number of rows affected.

public DataSet ExecuteSqlStatementAsDataSet(string sqlStatement)

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.

public DataTable ExecuteSqlStatementAsDataTable(string sqlStatement)

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.

public DbDataReader ExecuteSqlStatementAsDbDataReader(string sqlStatement)

Executes a Transact-SQL statement against the connection and builds a DbDataReader.

public T ExecuteSqlStatementAsScalar<T>(string sqlStatement)

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.

public T ExecuteSqlStatementAsScalar<T>(string sqlStatement, IEnumerable<SqlParameter> parameters)

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.

public void ReleaseConnection()

Releases a database connection.

public void RollbackTransaction()

Rollbacks a database transaction.