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

NuGet Commands: Drop-Database #4907

Closed
wants to merge 3 commits into from
Closed

NuGet Commands: Drop-Database #4907

wants to merge 3 commits into from

Conversation

bricelam
Copy link
Contributor

This includes changes from #4657. Only 03f95a2 needs review.

cc @natemcmaster @laskoviymishka (aka Rarity)

Resolves #2476

{
Reporter.Output.WriteLine(message);
Reporter.Output.WriteLine(
$"Are you sure you want to drop the database '{database}' on server '{dataSource}'? (y/N)");
var readedKey = Console.ReadKey().KeyChar;
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we skip read altogether this if --force was used?

@natemcmaster
Copy link
Contributor

It looks like --force on dotnet-ef doesn't actually skip the prompt.

Otherwise, :shipit:

@bricelam
Copy link
Contributor Author

Thanks. I'll do a bit of bashing on this too before merging.

param ($database, $dataSource)

return $PSCmdlet.ShouldProcess("$database on $dataSource")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bad news. This results in Cannot serialize delegates over unmanaged function pointers, dynamic methods or methods outside the delegate creator's assembly. 😞

@bricelam
Copy link
Contributor Author

Recalling. We need to rethink how the confirmation works. One idea @natemcmaster had was to get the information in a separate command (e.g. Get-DbContext / dotnet ef dbcontext show --json), then prompt, then call drop.

@bricelam bricelam closed this Mar 29, 2016
@bricelam bricelam mentioned this pull request Apr 1, 2016
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.

4 participants