Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server: Scaffold HasTrigger if the table contains triggers #28185

Closed
roji opened this issue Jun 8, 2022 · 0 comments · Fixed by #28253
Closed

SQL Server: Scaffold HasTrigger if the table contains triggers #28185

roji opened this issue Jun 8, 2022 · 0 comments · Fixed by #28253
Assignees
Labels
area-scaffolding area-sqlserver closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Jun 8, 2022

Since #27372, SaveChanges fails by default on SQL Server for tables with triggers. We could detect triggers when scaffolding and scaffold HasTrigger to make the database-first story smoother. This may be a bit tricky since HasTrigger is on TableBuilder rather than directly on EntityTypeBuilder (not sure if we already have the infra for scaffolding that).

Raised by @ErikEJ in ErikEJ/ErikEJ#1 (comment)

@ajcvickers ajcvickers added this to the 7.0.0 milestone Jun 10, 2022
roji added a commit to roji/efcore that referenced this issue Jun 16, 2022
HasTrigger with trigger name only, to make the SQL Server SaveChanges work out of the box.

Closes dotnet#28185
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 16, 2022
roji added a commit to roji/efcore that referenced this issue Jun 16, 2022
HasTrigger with trigger name only, to make the SQL Server SaveChanges work out of the box.

Closes dotnet#28185
roji added a commit to roji/efcore that referenced this issue Jun 18, 2022
HasTrigger with trigger name only, to make the SQL Server SaveChanges work out of the box.

Closes dotnet#28185
roji added a commit that referenced this issue Jun 20, 2022
HasTrigger with trigger name only, to make the SQL Server SaveChanges work out of the box.

Closes #28185
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview6 Jun 20, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview6, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-scaffolding area-sqlserver closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants