npgsql/npgsql — pull request #394 by roji (2014-10-22 07:58:04+00:00)
Title: Fix prepared dispose after connection close

NpgsqlCommand now listens to its connection's open/close events.
On close, sets its prepare status to NotPrepared, avoiding the
DEALLOCATE on Dispose().

A bit of additional cleanup around command/connection relations,
but further work is needed for cases where the same command gets
transferred across connections.

Fixes #393
Relates to #299