Skip to content

use SqlParameterCollection.AddRange #2

@JoeGaggler

Description

@JoeGaggler

Minor suggestion to use SqlParameterCollection.AddRange to add parameters to the command, instead of Add on each one:

cmd.Parameters.AddRange(
    CreateParameter("@foo", foo, SqlDbType.VarChar, 1000),
    CreateParameter("@bar", bar, SqlDbType.VarChar),
    CreateParameter("@status", format, SqlDbType.TinyInt, 1)
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions