Is it safe to write this helper method like this? Will it always close the connection? I understend if all goes well, it will, but will ExecuteReader close the connection ev
Personally I prefer a using clause statement to close/dispose the connection , simply for parallel construction reasons - same as in good English Grammar.
From my point of view using the CommandBehavior is not balanced and therefore unpredictable.
I constantly tell to my developers to go simple and consistent.
As if they forget to set the CommandBehavior...
I won't see it...
but if they don't use ausingstatement...
I will see it as it is very important.