有没有一种简单的方法可以获取LINQPad连接窗口中列出的数据库的连接字符串(除了使用Visual Studio的对象资源管理器)?
this.Database.Connection.ConnectionString
。 - ZorgoZstring c = LINQPad.Util.CurrentDataContext.Connection.ConnectionString;
this.Database.GetDbConnection().ConnectionString
this.Database.GetConnectionString()
。我正在使用 EF Core 6 提供程序。 - Will Huang
<machinename>\
而不是像这里提到的实例名称:https://dev59.com/FGw05IYBdhLWcg3w0VGa - Frank van Puffelenthis.Connection.ConnectionString.Dump();
。 - sgmoore