1
Usually when working with the Entity framework, we use the calls in the console
add-migration migrationName
update-database
I’d like to make it a method, so when you call him, he’ll be executed.
Reason: I am implementing multitenancy in my bank, I will separate my clients by schema. Soon the schema will be set and when executing this update, I will create the new schema for that particular client, I can’t leave it automatic, because if I have N schema, it won’t be able to update all schemas, just whatever is set as default/current
You want to call a
migration
at system run time?– Leonel Sanches da Silva
Exactly that, to create the schema as I mentioned there in the motif, rsrs
– Rod
I see no need. You can simulate the behavior of a
Migration
through aAction
. Stay more within Application Design.– Leonel Sanches da Silva