You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
command.CommandText = "SELECT * FROM mytable WHERE Id = :Id";
command.Parameters.AddWithValue("Id", id);
and
command.CommandText = "SELECT * FROM mytable WHERE Id = @Id";
command.Parameters.AddWithValue("@Id", id);
Is there any difference in both methods in performance or something else? I also think the difference (if any) should be mentioned in the project Wiki.
The text was updated successfully, but these errors were encountered:
There are no differences whatsoever between the two, Npgsql parses the command text and replaces them with PostgreSQL's native parameter placeholders, which are positional and not named ($1, $2).
There are two ways to add parameters:
and
Is there any difference in both methods in performance or something else? I also think the difference (if any) should be mentioned in the project Wiki.
The text was updated successfully, but these errors were encountered: