IDbConnection.Close 方法
定义
关闭与数据库之间的连接。Closes the connection to the database.
public:
void Close();
public void Close ();
abstract member Close : unit -> unit
Public Sub Close ()
注解
Close方法将回滚所有挂起的事务。The Close method rolls back any pending transactions. 然后,它会释放到连接池的连接,或者在禁用连接池的情况下关闭连接。It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled.
应用程序可以调用 Close 多个时间而不生成异常。An application can call Close more than one time without generating an exception.