Skip to content

Commands: Use startup project to discover services - #2288

Merged
bricelam merged 1 commit into
dotnet:devfrom
bricelam:startup
Jun 4, 2015
Merged

bricelam merged 1 commit into
dotnet:devfrom
bricelam:startup

Conversation

@bricelam

Copy link
Copy Markdown
Contributor

Resolves #2219 & resolves #2024

Depends on aspnet/Hosting#284

Verification: Manual bashing

@ajcvickers

Copy link
Copy Markdown
Contributor

:shipit:

Just a thought. When AddDbContext is called it will register the context in D.I. as both its specific type and as just DbContext. So if the AddDbContext mechanism is being used and only a single context type is being used, then the context instance (and its type) could be obtained from the service provider even without first knowing or discovering it. This might be advantageous for cases where the context is in a different assembly. But then again, it might be best just to take a more general approach to that scenario such that we always use the exact type name of the context class.

@bricelam
bricelam merged commit 0e69f6a into dotnet:dev Jun 4, 2015
@bricelam
bricelam deleted the startup branch June 4, 2015 22:13
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.

3 participants