PostgresSingleton 1.0.0
dotnet add package PostgresSingleton --version 1.0.0
NuGet\Install-Package PostgresSingleton -Version 1.0.0
<PackageReference Include="PostgresSingleton" Version="1.0.0" />
paket add PostgresSingleton --version 1.0.0
#r "nuget: PostgresSingleton, 1.0.0"
// Install PostgresSingleton as a Cake Addin #addin nuget:?package=PostgresSingleton&version=1.0.0 // Install PostgresSingleton as a Cake Tool #tool nuget:?package=PostgresSingleton&version=1.0.0
//string to connect to DB string dbStringConnection = "Server=SERVERADDRESS;User Id=USERNAME;Password=ULTRASECURITYPASS;Database=YOUDEFAULTDATABASE;";
//RETRYNG DATA FROM DB string query = "SELECT * FROM table"; DataTable returnDB = SingletonDB.query(query, dbStringConnection);
if (returnDB.Rows.Count > 0) { foreach (DataRow gateway in returnDB.Rows) { Gateway add = new Gateway(); add.id = Convert.ToInt32(gateway["id"]); add.ip = gateway["ip"].ToString(); add.ipsecundario = gateway["ipsecundario"].ToString(); add.titulo = gateway["titulo"].ToString(); add.porta = Convert.ToInt32(gateway["porta"]); add.timeout = Convert.ToInt32(gateway["timeout"]); add.status = Convert.ToInt32(gateway["status"]); add.aguardando = Convert.ToInt32(gateway["aguardando"]); add.mensagem = gateway["mensagem"].ToString(); add.dbStringConnection = dbStringConnection; lista.Add(add); } }
//WRITING DATA TO DB query = "INSERT INTO table VALUES(values)"; try { SingletonDB.execute(query, dbStringConnection); } catch (Exception error) { Console.WriteLine("Fail: " + error.Message); }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- Npgsql (>= 4.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|