efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

Syncing Connection and ConnectionString fix the bug that AdminDatabase Setting is invalid when DataSource is setted.

Open tianvan opened this issue 1 year ago • 0 comments

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.

tianvan avatar Mar 07 '24 06:03 tianvan