I am creating a connection to a database in SQL server with C #, and I want to make a hook to close the connection when closing the application, just like in java when using the ShutDownhook.
I am creating a connection to a database in SQL server with C #, and I want to make a hook to close the connection when closing the application, just like in java when using the ShutDownhook.