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

Design: Allow script/update etc. to run when context is not in target project, but can be found in services #7710

Closed
rowanmiller opened this issue Feb 24, 2017 · 4 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@rowanmiller
Copy link
Contributor

rowanmiller commented Feb 24, 2017

Listing DbContext's will return contexts that are registered in services, even if they reside in another project. Some commands (such as adding a migration) require the target project, since they generate code files, but others only need a context instance and could run by getting the context from services.

Perhaps we could also consider making this work if there is an IDbContextFactory in the target project.

This will help ASP.NET Core publishing.

cc @vijayrkn @mlorbetske

@rowanmiller rowanmiller added this to the 1.0.4 milestone Feb 24, 2017
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Feb 28, 2017
@bricelam bricelam reopened this Apr 18, 2017
@ajcvickers ajcvickers reopened this Apr 19, 2017
@ajcvickers
Copy link
Contributor

@Eilon And this one is "patch proposed" as of this afternoon. Guess we have some conversions to have. 😺

@bricelam bricelam changed the title Tools: Allow script/update etc. to run when context is not in target project, but can be found in services Design: Allow script/update etc. to run when context is not in target project, but can be found in services Apr 19, 2017
@ajcvickers
Copy link
Contributor

@bricelam Just from reading this it isn't clear why this should go into the patch. Can you explain some more?

@bricelam
Copy link
Contributor

bricelam commented Apr 19, 2017

This was an ask from the Scaffolding team. Issue aspnet/Tooling#898 describes the end-to-end scenario that this fix enables.

@Eilon
Copy link
Member

Eilon commented Apr 23, 2017

This patch fix is approved. Please follow the normal code review / pull request process and make sure you make the change in the correct branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants