Skip to content

Document database trigger model-building APIs - #5452

Merged
cincuranet merged 2 commits into
mainfrom
copilot/document-database-triggers-api
Aug 31, 2026
Merged

cincuranet merged 2 commits into
mainfrom
copilot/document-database-triggers-api

Conversation

Copilot AI commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

The HasTrigger API linked to missing guidance and did not clearly explain that migrations do not create triggers.

  • Model configuration

    • Document HasTrigger using the existing sample:

      modelBuilder.Entity<BlogWithTrigger>()
          .ToTable(tb => tb.HasTrigger("TRG_InsertUpdateBlog"));
  • Migration limitation

    • Clarify that HasTrigger only registers model metadata.
    • Link to migrationBuilder.Sql guidance for creating trigger DDL.

Copilot AI changed the title [WIP] Document database triggers model building APIs Document database trigger model-building APIs Aug 19, 2026
Copilot AI requested a review from AndriySvyryd August 19, 2026 01:38
@AndriySvyryd
AndriySvyryd marked this pull request as ready for review August 19, 2026 20:42
@AndriySvyryd
AndriySvyryd requested review from cincuranet and a lite review from Copilot August 19, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates EF Core modeling documentation to properly document table trigger configuration via HasTrigger, and clarifies the migrations limitation (triggers are not created by EF migrations).

Changes:

  • Added a new “Table triggers” section documenting ToTable(tb => tb.HasTrigger(...)) using an existing sample snippet.
  • Clarified that HasTrigger only affects EF model metadata and that trigger DDL must be applied via migrationBuilder.Sql, linking to the relevant migrations guidance.
  • Refreshed the page ms.date.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cincuranet
cincuranet merged commit 019fbfe into main Aug 31, 2026
6 checks passed
@cincuranet
cincuranet deleted the copilot/document-database-triggers-api branch August 31, 2026 10:04
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.

Document database triggers model building APIs

4 participants