Should I reuse Npgsql connections in a C# application?
Posted on 2016-10-31
I've got a C# method that, during it's course of execution, is running several queries using npgsql.
I have several queries to gather data from different sources (tables), and then a query to insert
the results into a separate table.
Is it best in this scenario to reuse the NpgsqlConnection for all the queries, or use a
separate NpgsqlConnection for each query.
I'm new to npgsql and not sure what the best practice would be in terms of
performance and reliability.