Closed risogolo closed 4 years ago
Hi @risogolo
Esquio UI, the free admin tool to manage Esquio products/features/toggles, initialize and migrate database to latest version. You can view migrate and seed on:
This MigrateDbContext Extension method do migration and seed (if exist)
If you plan to use database without UI, creating your own tool to admin products/features/toggles, you can add migrations ( dotnet ef migrations add ... ) from the EF configuration store to your project.
In Esquio 3.X, on development, we are chaning some things related with the store, all feedback is welcome for next version!!
Thanks Unai
Hello, thank for you response, I guess that method should exist in the libray itself or in the library for SqlStore, not it in Esquio.UI, also if you are planning to change that please do also DB schema name configurable, as I seems the library can read the data from any schema name, currently it's defined by default in dbo and it's not easy to change it "from outside" of DbContext (from configurartion)
Hi risogolo!
Yeap, on V3 we are working on it, and probably, the store will be only for configuration and distributed ( to UI using http api ) because this enable distributed scenarios and also some multi-tenancy.
On 2.X you can use StoreOptions to configure default schema and table names
Hi @risogolo
You can configure it using StoreOptions:
.AddEntityFrameworkCoreStore(options =>
{
options.DefaultSchema = "yourschema";
options.ConfigureDbContext = (builder) =>
{
builder.UseSqlServer(Configuration.GetConnectionString("Esquio"));
};
})
Regards!
I guess this is where you set which schema to read from, but If I understand this correcly, currently the db tables are created only from UI project and there is no option to name the schema in which the tables will be created and I'm not able to seed the db currently without using UI, If I want to use just out of the box functionality. I know I can replicate the StoreDbContextSeed class into my project, but I believe this class should not be within UI project but within Esquio.EntityFrameworkCore.Store and this not contain an option for setting the schema name from outside
Yeap, I hope Esquio 3, we are planing to release in May solve this issue and improve the experience with this!
Already pushed on Esquio 3! Preview version are on NuGet right now!
Trying to get empty DB tables created with Esquio.EntityFrameworkCore.Store I'm unable to do it, It seems to be created when I use that Esquio.UI, but I might dont want to use it Is it possible to automaticaly create DB if it does not exist, therefore I can use sql script or use EF migrations to insert data there