OracleTableDependency

This class it is used to monitor changed on a specific table. Every insert/update/delete operation done on the table, trigger an C# event, containing the values for the changed record.

Overview

OracleTableDependency implement the IDisposable interface to provides a mechanism for destroying database resources generated to receive table change notifications. To take advantage of that, use the using statement pattern.

OracleTableDependency implement the generic pattern allow you to delay the specification of the data type used to be filled in the the value for the changed record.

Note: User specified in connection string must have the CREATE and DROP system privilege for:
  • TYPE
  • TRIGGER
  • PROCEDURE
  • JOB
Additionally, user must have grant execute on the AQ packages as follows:
  • GRANT EXECUTE ON DBMS_AQADM TO user;
  • GRANT EXECUTE ON DBMS_AQ TO user;
Dependency

Oracle Managed Data Access: https://www.nuget.org/packages/Oracle.ManagedDataAccess/

Constructors

Name Description
OracleTableDependency(string, string, ModelToTableMapper<T> = null, IEnumerable<string> = null) Creates a new instance of the OracleTableDependency class, associates it with the connection string and table parameter, and optionally specifies naming convention for the database object created to receive notifications.

Events

Name Description
OnChange Occurs when a notification is received for any of the change done on the monitored table.
OnError Occurs when a exception is received during the listening stage.

Properties

Name Description
DataBaseObjectsNamingConvention Naming convention used to create all database objects used to receive notifications.
Status OracleTableDependency status.

Methods

Name Description
Start(int, int) Create database objects and start waiting for notifications.
Stop() Stop listen for notification and destroy database objects.

Last edited Nov 15, 2015 at 7:57 PM by delbianco, version 21