Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.31k stars 267 forks source link

Amateur question related to migration #796

Closed joaquinniicolas closed 6 months ago

joaquinniicolas commented 6 months ago

Hi I'm new here. I love the bookstore, but I have a question. In NET 7 How can I create the database without running dotnet ef Database Update? Is there any equivalent to MigrateAsync() ?

AndrewTriesToCode commented 6 months ago

Hi, there is a way to do it with code. As described here: https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli#apply-migrations-at-runtime

However, you can do it from the command line with Finbuckle but you have to use a design time factory as discussed here: https://www.finbuckle.com/MultiTenant/Docs/v6.13.1/EFCore#design-time-instantiation

joaquinniicolas commented 6 months ago

Thank you very much for your quick response. Those articles were very helpful.