question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use dotnet run /seed throw error

See original GitHub issue

Use dotnet run /seed is error, But use dotnet ef database update is ok, Unable to create database automatically in Docker. image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
Seaearcommented, Feb 26, 2019

@skoruba Great, I tested it is working fine. Thanks

1reaction
xmichaelxcommented, Feb 21, 2019

This basically boils down to either issuing those commands (which you can automate in Dockerfile if I understand correctly) or adding to code for each of 4 builtin contexts:

context.Database.Migrate();

From my POV it’s a matter of preference and I would like the community to voice their preferences.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to seed database with EF Core
When I run the project, I don't get any build errors or exceptions but the database does not seed and I get a...
Read more >
Migrations and Seed Data With Entity Framework Core
We are going to learn about Migrations and Seed data in Entity Framework Core and how to optimize EF Core migrations.
Read more >
Re-thinking Running Migrations and Seeding in ASP.NET ...
In Entity Framework Core, I've been using an approach to run migrations and ... It throws an error and all work stops (sure...
Read more >
Exception while executing dotnet run --migrate-database #4508
I have implemented data seeding using IDataSeedContributor and it is working fine with ./migrate-database. But I'm looking to migrate on runtime ...
Read more >
Seeding data using EF Core in ASP.NET Core 6.0 Minimal ...
In order to seed the data, we are going to write a data seeding class to inject certain data while our application starts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found