DbConnection Extension Methods
The following extension methods are defined for the DbConnection type
- void SafeClose(bool dispose).
A safe close method for a database connection which can also dispose the connection if dispose is true. SafeClose checks if the connection specified is not closed and not null and only then closes the connection.