So, to achieve Database Independence, I need 2 general nuget packages and one per each EFCore version
https://www.nuget.org/packages/EFCore_DaIn/ – has the interfaces of plugin (provider name) and connection data (name, connection string, database name)
https://www.nuget.org/packages/EFCore_DaInLoader – loads the plugins from the web or from local hard disk , with EF Core versions ( 10,11…)
https://www.nuget.org/packages/EFCore_DaIn_10 – has a relation with EFCore 10 . Knows about DbContextOptionsBuilder and has reference to EFCore 10 because of shared types in plugins
public static IReadOnlyCollection<Type> Types { get; } =
[
typeof(IDatabasePlugin),
typeof(IEFCore_DatabasePlugin),
typeof(IEFCore_DatabasePlugin_10),
typeof(DbContext),
typeof(DbContextOptions),
typeof(DbContextOptionsBuilder),
typeof(IDbContextOptions),
];
When EFCore 11 will appear ( soon!) , I will have EFCore_Dain_11 to load data from EFCore 11