protected async Task <T> QuerySingleOrDefaultAsync <T>(string sql, object parameters = null) { using (IDbConnection connection = new Npgsql.NpgsqlConnection(this.connectionString)) { try { connection.Open(); return(await connection.QuerySingleOrDefaultAsync <T>(sql, parameters)); } catch (Exception exc) { Console.WriteLine(exc); throw exc; } } }