Skip to content

docs: fix mismatched and missing code samples - #4737

Merged
jeremydmiller merged 1 commit into
masterfrom
docs/v9-accuracy-sample-fixes
Jun 14, 2026
Merged

jeremydmiller merged 1 commit into
masterfrom
docs/v9-accuracy-sample-fixes

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

What

Third follow-up from the docs audit: pages whose embedded sample pointed at the wrong #region, was missing, or was duplicated. Where the right sample didn't exist, the source was given a proper region (and mdsnippets regenerated the markdown).

Fixes

  • querying/advanced-sql — the "All AdvancedSql methods also support parameters" section embedded sample_document_schema_resolver_resolve_schemas (schema-name resolution). Pointed it at sample_advanced_sql_query_parameters, which actually demonstrates parameter usage.
  • documents/aspnetcore — the "compiled query" sample (Get3) was a plain LINQ query byte-identical to the non-compiled Get2. Rewrote it to use the existing IssueById compiled query via session.WriteOne(new IssueById { Id = issueId }, HttpContext) (the ICompiledQuery overload). IssueService builds clean.
  • events/skipping — the page ended mid-sentence ("…or this helper API:") with no example. Added a sample_mark_events_as_skipped region around the existing MarkEventsAsSkipped helper and referenced it.
  • documents/storing — removed a second "asynchronous version" bulk-insert snippet that was byte-identical to the one above it; all bulk-insert APIs are already async.
  • documents/deletes — under "Neither DeletedSince nor DeletedBefore are inclusive…" the embedded snippet was an unrelated global-soft-delete config. Replaced with the actual statement of the exclusivity behavior.
  • events/querying — added the Tags, UserName, IsSkipped, and AddTag(...) members to the inline IEvent interface listing to match the current interface.

Source changes

Only IssueController.Get3 (compiled-query usage) and a new #region marker in EventSkipping.cs; the rest is regenerated markdown.

🤖 Generated with Claude Code

- querying/advanced-sql: the 'support parameters' section embedded the
  schema-resolver snippet; point it at sample_advanced_sql_query_parameters
- documents/aspnetcore: the 'compiled query' sample used a plain LINQ query
  identical to the non-compiled one; rewrite Get3 to use the IssueById
  compiled query via session.WriteOne(...)
- events/skipping: page was truncated with no example; add a
  sample_mark_events_as_skipped region for the MarkEventsAsSkipped helper
- documents/storing: removed a duplicate 'asynchronous version' bulk-insert
  snippet that was byte-identical to the one above it (all bulk insert APIs
  are async)
- documents/deletes: replaced a mismatched global-soft-delete snippet under
  the DeletedSince/DeletedBefore exclusivity note with the actual statement
- events/querying: add Tags, UserName, IsSkipped and AddTag(...) members to
  the inline IEvent interface listing
@jeremydmiller
jeremydmiller merged commit b7cef80 into master Jun 14, 2026
8 checks passed
@jeremydmiller
jeremydmiller deleted the docs/v9-accuracy-sample-fixes branch June 14, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant