Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public DataSet getData(List<NpgsqlCommand> cmds, int timeout)
- {
- try
- {
- DataSet toReturn = new DataSet();
- if (staticTables != null && cmds.Count > 0)
- {
- var con = getNewConnection();
- cmds.ForEach(cmd =>
- {
- cmd.Connection = con;
- NpgsqlDataAdapter adapter = new NpgsqlDataAdapter(cmd);
- adapter.Fill(toReturn);
- });
- }
- return toReturn;
- }
- catch (Exception e)
- {
- log.Warn(e, "Failed to load tables from given list of strings.");
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement