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

Add DbContext.Database.GetMigrations() etc. methods #6445

Merged
merged 1 commit into from
Sep 9, 2016
Merged

Add DbContext.Database.GetMigrations() etc. methods #6445

merged 1 commit into from
Sep 9, 2016

Conversation

bricelam
Copy link
Contributor

Resolves #6110

/// </summary>
/// <param name="databaseFacade"> The <see cref="DatabaseFacade" /> for the context.</param>
/// <returns>The list of migrations.</returns>
public static IEnumerable<string> GetMigrations([NotNull] this DatabaseFacade databaseFacade)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are migration ids still the best thing to return from these APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, at a high level, that's the only thing you can really use (to pass one it into Migrate or one of the commands). For more advanced scenarios, you can use IMigrationsAssembly to get the types and instances of the migration classes, but I have no idea what you'd be trying to do with them--analysis?

Copy link
Contributor

Choose a reason for hiding this comment

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

Was thinking tooling etc. but it seems fine to just use IMigrationsAssembly, too,

@anpete
Copy link
Contributor

anpete commented Sep 9, 2016

:shipit:

@bricelam bricelam merged commit c0780f4 into dotnet:dev Sep 9, 2016
@bricelam bricelam deleted the migget branch September 9, 2016 17:32
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