When i run migrations to create a database via the Package Manager Console. Is there a way to output text from the Seed method to the NuGet console?
Just the simple create command:
Update-Database -StartupProjectName "Data" -Verbose
You can execute an SQL PRINT command within the Up()
or Down()
methods of each individual migration.
base.Sql("PRINT 'I heart kittens';");
This will output 'I heart kittens' to the Package Manager Console window in highlighted yellow text during the 'update-database' process.
I don't think you can output it directly, but you can use tracing and debug commands and attach another instance of VS to see the output.
Taken from this question: Where can I find the console or debug output from code executed in the package manager window?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With