takes NpgsqlConnection as a parameter

Changed method signature to take NpgsqlConnection as a parameter which empowers it to work under transactions.