Skip to content

DbConnection Extension Methods

OtisInf edited this page Feb 19, 2013 · 1 revision

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.