You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ConfigureDataSource ignored when UseNpgsql without ConnectionString parameter used #3692
@nesc58 thanks, you seem to be right. I'll push a fix.
Minimal runnable repro
awaitusingvarcontext=newBlogContext();awaitcontext.Database.EnsureDeletedAsync();awaitcontext.Database.EnsureCreatedAsync();publicclassBlogContext:DbContext{publicDbSet<Blog>Blogs{get;set;}protectedoverridevoidOnConfiguring(DbContextOptionsBuilderoptionsBuilder)=>optionsBuilder.UseNpgsql(// Uncommenting the following makes the program work// string.Empty,
o =>o.ConfigureDataSource(b =>{b.ConnectionStringBuilder.Host="localhost";b.ConnectionStringBuilder.Username="test";b.ConnectionStringBuilder.Password="test";})).LogTo(Console.WriteLine,LogLevel.Information).EnableSensitiveDataLogging();}publicclassBlog{publicintId{get;set;}publicstringName{get;set;}}
Activity
Allow null connection string with ConfigureDataSource
roji commentedon Dec 23, 2025
@nesc58 thanks, you seem to be right. I'll push a fix.
Minimal runnable repro
Allow null connection string with ConfigureDataSource
Allow null connection string with ConfigureDataSource (#3693)
Allow null connection string with ConfigureDataSource (npgsql#3693)
Allow null connection string with ConfigureDataSource (#3693)