Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Npgsql Async SnippetsNew to Visual Studio Code? Get it now.
Npgsql Async Snippets

Npgsql Async Snippets

Prince Clicks

|
3 installs
| (0) | Free
C# snippets for Npgsql ExecuteNonQueryAsync, ExecuteScalarAsync, and ExecuteReaderAsync templates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Npgsql Async Snippets

Snippets for C# that scaffold Npgsql async command patterns.

Snippets

  1. npq-execnonquery-async → ExecuteNonQueryAsync template
  2. npq-execscalar-async → ExecuteScalarAsync template
  3. npq-execreader-async → ExecuteReaderAsync template

Example

var qry = "UPDATE t_application SET c_reason = @reason WHERE c_id = @id";
await using var cmd = new NpgsqlCommand(qry, _conn);
// cmd.Parameters.AddWithValue("reason", reason);
var res = await cmd.ExecuteNonQueryAsync();

Notes

  • This is a snippet-only extension. There is no runtime code.
  • Update publisher in package.json before publishing.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft