System.Data.Common.DbCommandBuilder.InitializeCommand(System.Data.Common.DbCommand)

Here are the examples of the csharp api class System.Data.Common.DbCommandBuilder.InitializeCommand(System.Data.Common.DbCommand) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

View license
protected override DbCommand InitializeCommand(DbCommand command) {
            SqlCommand cmd = (SqlCommand) base.InitializeCommand(command);
            cmd.NotificationAutoEnlist = false;
            return cmd;
        }

2. Example

Project: referencesource
Source File: DBCommandBuilder.cs
View license
private DbCommand BuildDeleteCommand(DataTableMapping mappings, DataRow dataRow) {
            DbCommand command = InitializeCommand(DeleteCommand);
            StringBuilder builder = new StringBuilder();
            int parameterCount  = 0;

            Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name");

            builder.Append(DeleteFrom);
            builder.Append(QuotedBaseTableName);

            parameterCount = BuildWhereClause(mappings, dataRow, builder, command, parameterCount, false);

            command.CommandText = builder.ToString();

            RemoveExtraParameters(command, parameterCount);
            DeleteCommand = command;
            return command;
        }

3. Example

Project: referencesource
Source File: DBCommandBuilder.cs
View license
private DbCommand BuildInsertCommand(DataTableMapping mappings, DataRow dataRow) {
            DbCom/n ..... /n //View Source file for more details /n }

4. Example

Project: referencesource
Source File: DBCommandBuilder.cs
View license
private DbCommand BuildUpdateCommand(DataTableMapping mappings, DataRow dataRow) {
            DbCom/n ..... /n //View Source file for more details /n }