I was just reading a question about how to add parameters to a SqlCommand in .NET, and it raised a question for me. In all of my programs, this is how I add parameters to m
Both ways are going to create objects - whether you call the constructor yourself or whether another method does, the object is still going to be created.
More importantly, however, you're about to make a database call. The cost of creating a dozen objects is going to be absolutely peanuts compared with the database call, even if it's a very fast call.
Don't worry about it - just use the most readable code.