Onchange event called many times per change on table.

Jan 14, 2016 at 2:24 PM

i have a problema in my OracleTableDependency.

when i change a record in my table, the OracleTableDependency' instance call the onchange event many times. i do not know why it is happend.

do i need a specific configuration to the instance?

any help is aprecciated.

It is my code:
          var connectionString = ConfigurationManager.ConnectionStrings[_connectionName].ConnectionString;

        _table = new OracleTableDependency<T>(connectionString);            

        _table.OnChanged += (o, e) =>
                var op = NotificationType.None;

                if (e.ChangeType == ChangeType.Delete) op = NotificationType.Deleted;
                else if (e.ChangeType == ChangeType.Insert) op = NotificationType.Insert;
                else if (e.ChangeType == ChangeType.Update) op = NotificationType.Updated;

                if (op != NotificationType.None)
                    var ev = new NotificationEvent<T>(e.Entity, op);


        _table.OnError += (o, e) =>
            var ev = new NotificationErrorEvent<T>(e.Error, e.Message);

Jan 14, 2016 at 3:15 PM

Can you send to my personal email address a ZIP file containing the solution with the problem you reported me?
Because I need more detail to help you.


Jan 14, 2016 at 5:30 PM
Be aware that if your SQL script update or delete more than one row, you will receive more OnChange events.