Skip to content

Commit

Permalink
add support for ad-hoc PostgreSQL connection
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Apr 25, 2021
1 parent b935b81 commit 87a1e72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/GUI/EFCorePowerTools/Dialogs/ConnectionDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
x:Name="cmdDatabaseType"
SelectedValue="{Binding DbType, Mode=TwoWay}"
SelectedValuePath="Tag" Grid.Row="3" Margin="12,2" Width="136" HorizontalAlignment="Left" >
<ComboBoxItem Tag="5" >PostgreSQL</ComboBoxItem>
<ComboBoxItem Tag="4" >SQLite</ComboBoxItem>
<ComboBoxItem Tag="3" >Azure SQL DB</ComboBoxItem>
<ComboBoxItem Tag="10" >Firebird</ComboBoxItem>
Expand Down
8 changes: 6 additions & 2 deletions src/GUI/EFCorePowerTools/Dialogs/ConnectionDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ private void cmdDatabaseType_SelectionChanged(object sender, System.Windows.Cont

if (cmdDatabaseType.SelectedIndex == 0)
{
txtSample.Text = "Data Source=C:\\data\\Application.db";
txtSample.Text = "Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;";
}
if (cmdDatabaseType.SelectedIndex == 1)
{
txtSample.Text = "Server=myserver.database.windows.net;Authentication=Active Directory Interactive;Database=mydatabase;User [email protected]";
txtSample.Text = "Data Source=C:\\data\\Application.db";
}
if (cmdDatabaseType.SelectedIndex == 2)
{
txtSample.Text = "Server=myserver.database.windows.net;Authentication=Active Directory Interactive;Database=mydatabase;User [email protected]";
}
if (cmdDatabaseType.SelectedIndex == 3)
{
txtSample.Text = "database=localhost:demo.fdb;user=sysdba;password=masterkey";
}
Expand Down

0 comments on commit 87a1e72

Please sign in to comment.