efcore.pg
efcore.pg copied to clipboard
Syncing Connection and ConnectionString fix the bug that AdminDatabase Setting is invalid when DataSource is setted.
When both Connection and ConnectionString are not null, Connection's ConnectionString is different to ConnectionString, the ConnectionString will be used instead of the Connection's ConnectionString.
It will cause a bug, for example, I need to create database through following code:
DbContext.Database.Migrate()
if DatabaseSource is Setted:
extension.WithDataSource(dataSource);
then we set AdminDatabase:
extension.WithAdminDatabase("postgres");
it wont work.