There are two ways to add parameters:
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.
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.