private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs args) { // make sure we are still to proceed if (args.Status != UpdateStatus.Continue) { return; } if (_schema == null) { GenerateSchema(); } if (StatementType.Delete == args.StatementType) { args.Command = CreateDeleteCommand(); } else if (StatementType.Update == args.StatementType) { args.Command = CreateUpdateCommand(); } else if (StatementType.Insert == args.StatementType) { args.Command = CreateInsertCommand(); } else if (StatementType.Select == args.StatementType) { return; } SetParameterValues(args.Command, args.Row); }
private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs args) { // make sure we are still to proceed if (args.Status != UpdateStatus.Continue) return; if (_schema == null) GenerateSchema(); if (StatementType.Delete == args.StatementType) args.Command = CreateDeleteCommand(); else if (StatementType.Update == args.StatementType) args.Command = CreateUpdateCommand(); else if (StatementType.Insert == args.StatementType) args.Command = CreateInsertCommand(); else if (StatementType.Select == args.StatementType) return; SetParameterValues(args.Command, args.Row); }