C
C#2y ago
Elio

Mutiple Database

hi, i want to create 2 different database which one with Materials and the other one with Programs in order to easily extract the database on usb key if i want to save them separately. is there a way to use add migration only on the directory Programs ? i know there is a way to focus ProgramsDbContext but i didnt find anything to specify the directory.
6 Replies
Elio
Elio2y ago
or should i keep only 1 database and save them separately with another solution ?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Elio
Elio2y ago
saving the database on usb key because i'm using sqlite so i use a file *.db to store my data
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Elio
Elio2y ago
if the user need to keep a save to avoid any manipulation problem like deleting the wrong programs etc. or simply to reuse the program on another machine
gerard
gerard2y ago
It's possible to target a DbContext with --context (docs: https://docs.microsoft.com/en-us/ef/core/cli/dotnet#common-options) So for example: dotnet ef migrations add MyCoolMigration --context ProgramsDbContext After that you can move the migration to the folder you like, if you add a new migration it'll auto detect the folder where the other migrations are and it'll put it in there.
Want results from more Discord servers?
Add your server
More Posts