Click or drag to resize

ReaderWriterLockingDataContext Class

A specialized data context that supports locking the provider to a single writable connection and multiple read connections concurrently.
Inheritance Hierarchy
SystemObject
  SanteDB.OrmLiteDataContext
    SanteDB.OrmLiteReaderWriterLockingDataContext

Namespace: SanteDB.OrmLite
Assembly: SanteDB.OrmLite (in SanteDB.OrmLite.dll) Version: 3.0.2081-alpha+d0a78774d3f97b9193d2ae2fef6d129ea9f29519
Syntax
public class ReaderWriterLockingDataContext : DataContext

The ReaderWriterLockingDataContext type exposes the following members.

Constructors
 NameDescription
Public methodReaderWriterLockingDataContext(IDbProvider, IDbConnection) Creates a new data context.
Public methodReaderWriterLockingDataContext(IDbProvider, IDbConnection, Boolean) Creates a new data context, and optionally marks it read only.
Public methodReaderWriterLockingDataContext(IDbProvider, IDbConnection, IDbTransaction) Creates a new writable data context with an existing transaction.
Top
Properties
 NameDescription
Public propertyCommandTimeout Overrides the command timeout for any command executed on this data context
(Inherited from DataContext)
Public propertyConnection Connection
(Inherited from DataContext)
Public propertyContextId Gets or sets the context id
(Inherited from DataContext)
Public propertyData Temporary lookup values used during this context's use
(Inherited from DataContext)
Public propertyIsReadonly True if the connection is readonly
(Inherited from DataContext)
Public propertyTransaction Current Transaction
(Inherited from DataContext)
Top
Methods
 NameDescription
Public methodAny(SqlStatement) Represents the count function
(Inherited from DataContext)
Public methodAnyTModel(ExpressionFuncTModel, Boolean) Returns only if only one result is available
(Inherited from DataContext)
Public methodBeginTransaction Begin a transaction
(Inherited from DataContext)
Public methodClose Close the connection however don't dispose
(Overrides DataContextClose)
Public methodCount(SqlStatement) Represents the count function
(Inherited from DataContext)
Public methodCountTModel(ExpressionFuncTModel, Boolean) Returns only if only one result is available
(Inherited from DataContext)
Public methodCreateSqlStatementBuilder(SqlStatement) Create sql statement
(Inherited from DataContext)
Public methodCreateSqlStatementBuilder(String, Object) Create sql statement
(Inherited from DataContext)
Public methodCreateTableTTable Create a table
(Inherited from DataContext)
Public methodDeleteTModel Delete from the database
(Inherited from DataContext)
Public methodDeleteAll(Type, SqlStatement) Delete from the database
(Inherited from DataContext)
Public methodDeleteAll(Type, LambdaExpression) Update all
(Inherited from DataContext)
Public methodDeleteAllTModel(ExpressionFuncTModel, Boolean) Delete from the database
(Inherited from DataContext)
Public methodDeleteAllTModel(SqlStatement) Update all with specified Sql based statement
(Inherited from DataContext)
Public methodDisableConstraints Instructs the provider to disable constraints (such as foreign keys, check constraints, etc.)
(Inherited from DataContext)
Public methodDispose Dispose this object
(Overrides DataContextDispose)
Public methodDropTableTTable Create a table
(Inherited from DataContext)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExecQueryTModel Executes the query against the database
(Inherited from DataContext)
Public methodExecuteNonQuery(SqlStatement) Execute a non query
(Inherited from DataContext)
Public methodExecuteNonQuery(String, Object) Execute the specified SQL
(Inherited from DataContext)
Public methodExecuteProcedureTModel First or default returns only the first object or null if not found
(Inherited from DataContext)
Public methodExecuteScalarTReturn Returns only if only one result is available
(Inherited from DataContext)
Public methodExists(Type, Guid) Determines if modelKey of type type exists in the database
(Inherited from DataContext)
Public methodExistsTModel(TModel) Determines if obj exists in the database
(Inherited from DataContext)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFirstOrDefault(Type, SqlStatement) First or default returns only the first object or null if not found
(Inherited from DataContext)
Public methodFirstOrDefaultTModel(ExpressionFuncTModel, Boolean) First or default returns only the first object or null if not found
(Inherited from DataContext)
Public methodFirstOrDefaultTModel(SqlStatement) First or default returns only the first object or null if not found
(Inherited from DataContext)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetQueryBuilder Query builder
(Inherited from DataContext)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInsertTModel Insert the specified object
(Inherited from DataContext)
Public methodInsertAllTModel Bulk insert data
(Inherited from DataContext)
Public methodInsertOrUpdateTModel INSERT OR IGNORE the specifed object
(Inherited from DataContext)
Public methodInsertOrUpdateAllTModel Bulk insert data
(Inherited from DataContext)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodOpen Open the connection to the database
(Overrides DataContextOpen(Boolean))
Public methodQuery(Type, SqlStatement) Non-generic implementation for query
(Inherited from DataContext)
Public methodQueryTModel(ExpressionFuncTModel, Boolean) Execute the specified query
(Inherited from DataContext)
Public methodQueryTModel(SqlStatement) Query using the specified statement
(Inherited from DataContext)
Public methodQueryTModel(String, Object) Execute a stored procedure transposing the result set back to TModel
(Inherited from DataContext)
Public methodRestoreConstraints Instructs the provider to enable constraints (such as foreign keys, check constraints, etc.)
(Inherited from DataContext)
Public methodSingleOrDefaultTModel Returns only if only one result is available
(Inherited from DataContext)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUpdateTModel Updates the specified object
(Inherited from DataContext)
Public methodUpdateAll(Type, SqlStatement, LambdaExpression) Update all data with specified where clause
(Inherited from DataContext)
Public methodUpdateAll(Type, LambdaExpression, LambdaExpression) Update all
(Inherited from DataContext)
Public methodUpdateAllTModel(IEnumerableTModel) Bulk update data
(Inherited from DataContext)
Public methodUpdateAllTModel(ExpressionFuncTModel, Boolean, ExpressionFuncTModel, Object) Updates the specified object
(Inherited from DataContext)
Public methodUpdateAllTModel(IEnumerableTModel, FuncTModel, TModel) Bulk update data
(Inherited from DataContext)
Public methodUpdateAllTModel(SqlStatement, ExpressionFuncTModel, Object) Update all with specified Sql based statement
(Inherited from DataContext)
Public methodUpdateAllTModel, TUpdateModel(ExpressionFuncTModel, Boolean, ExpressionFuncTUpdateModel, Object) Update all data matching whereExpression to updateStatements
(Inherited from DataContext)
Top
Events
 NameDescription
Public eventDisposed Fired when the connection is disposed
(Inherited from DataContext)
Top
Fields
 NameDescription
Public fieldStatic memberREAD_LOCK_TIMEOUT READ lock timeout
Public fieldStatic memberWRITE_LOCK_TIMEOUT Writer lock timeout
Top
Extension Methods
 NameDescription
Public Extension MethodAddOrUpdateData Adds or updates data on the context
(Defined by DataContextExtensions)
Public Extension MethodContainsStackEntry Returns true if the data stack contains an entry
(Defined by DataContextExtensions)
Public Extension MethodConvertTReturn The purpose of this method is to convert object me to TReturn. Why? Because if you have an instance of Act that actually needs to be a SubstanceAdministration we can't just cast so we have to copy.
(Defined by ExtensionMethods)
Public Extension MethodCreateInformationModelGuard Should be called when converting to information model to prevent stack overflows
(Defined by DataContextExtensions)
Public Extension MethodEstablishProvenance Establish a provenance entry for the specified connection
(Defined by DataContextExtensions)
Public Extension MethodGetProvenance Get provenance from the context
(Defined by DataContextExtensions)
Public Extension MethodInstall Install the specified object
(Defined by SqlFeatureUtil)
Public Extension MethodIsInstalled Returns true if the migration has been installed
(Defined by SqlFeatureUtil)
Public Extension MethodIsLoadingInformationModel Determine if the information model is loading
(Defined by DataContextExtensions)
Public Extension MethodPeekData Set data on the context in a safe manner
(Defined by DataContextExtensions)
Public Extension MethodPopData Set data on the context in a safe manner
(Defined by DataContextExtensions)
Public Extension MethodPushData Set data on the context in a safe manner
(Defined by DataContextExtensions)
Public Extension MethodShouldDisableObjectValidation Should disable object validation
(Defined by DataContextExtensions)
Public Extension MethodValidateMaximumStackDepth Validate that the current context is under the maximum stack depth
(Defined by DataContextExtensions)
Public Extension MethodWithControl With control parameter is used as a wrapper for _ parameters
(Defined by QueryFilterExtensions)
Top
See Also