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

RevEng: Let IDatabaseModelFactory override the scaffolded connection string #19799

Closed
bricelam opened this issue Feb 4, 2020 · 4 comments
Closed
Assignees
Labels
area-scaffolding closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

bricelam commented Feb 4, 2020

ErikEJ.EntityFrameworkCore.SqlServer.Dacpac currently scaffolds something like this:

.UseSqlServer("Chinook.dacpac")

Because that's the "connection string" you pass to dotnet ef dbcontext scaffold. We should add a hook for IDatabaseModelFactory implementations to override the connection string that gets scaffolded. We'd probably do this using an annotation on DatabaseModel.

cc @ErikEJ

@ajcvickers ajcvickers added this to the 5.0.0 milestone Feb 7, 2020
@bricelam bricelam added the good first issue This issue should be relatively straightforward to fix. label Feb 11, 2020
@lajones lajones self-assigned this Feb 13, 2020
@lajones lajones added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Feb 19, 2020
@lajones lajones closed this as completed Feb 19, 2020
@lajones
Copy link
Contributor

lajones commented Feb 19, 2020

@ErikEJ - FYI - the fix for this was just checked in. Just add databaseModel[ScaffoldingAnnotationNames.ConnectionString] = yourOverridingConnectionString in your implementation of IDatabaseModelFactory.Create().

@ErikEJ
Copy link
Contributor

ErikEJ commented Feb 20, 2020

Fantastic - is 5.0 preview1 out?

@ajcvickers
Copy link
Contributor

@ErikEJ Currently tentatively scheduled for sometime in March.

@ajcvickers ajcvickers modified the milestones: 5.0.0, 5.0.0-preview3 Mar 31, 2020
@ErikEJ
Copy link
Contributor

ErikEJ commented Jul 10, 2020

@lajones This has now been implemented! Thanks!

@bricelam bricelam removed their assignment Jul 26, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-preview3, 5.0.0 Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-scaffolding closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. type-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants