dotnet / dotnet/efcore

EF Core bundle upgrade seeding considerations

Open
#35,723 0 comments 3 reactions 0 assignees View on GitHub
area-migrations area-migrations-seeding customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

### What problem are you trying to solve?

`./efbundle` seems to be running seeding when used with `Use(Async)Seeding` methods, probably because the [efbundle docs](https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli#efbundle) say "It's equivalent to running `dotnet ef database update`" and the [Use(Async)Seeding](https://learn.microsoft.com/en-us/ef/core/modeling/data-seeding#configuration-options-useseeding-and-useasyncseeding-methods) say "The new seeding methods are called as part of EnsureCreated operation, Migrate and dotnet ef database update command"

### Describe the solution you'd like

I'd like better control over `./efbundle` seeding. Maybe with an added option [here](https://learn.microsoft.com/en-us/ef/core/cli/dotnet#dotnet-ef-migrations-bundle) that allows me to create bundles where it's
- [ ] Needed configuration and dummy data for Staging
- [ ] Needed configuration for Production

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.