From 14a86dcf62980ad5c168ee16b456f860c9ef5026 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 4 Jul 2023 15:15:12 +0800 Subject: [PATCH] Update demo --- .../Net7Test/NET7Test/NET7Test/Program.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs b/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs index c8e2faab3..50900b3ac 100644 --- a/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs +++ b/Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs @@ -4,6 +4,7 @@ using SqlSugar.DbConvert; using System.Text.Json; using System.Text.Json.Nodes; +//OracleTest(); ServerTest(); SqliteTest(); MyTest(); @@ -147,6 +148,21 @@ static void SqliteTest() var d1 = new UnitDate01231().dateOnly; var d2 = new UnitDate01231().timeOnly; } +static void OracleTest() +{ + var db = new SqlSugarClient(new ConnectionConfig() + { + DbType = DbType.Oracle, + IsAutoCloseConnection= true, + ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=150.158.37.115)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)));User Id= ;Password=Qdies123test;Pooling='true';Max Pool Size=150" + }, + it => + { + it.Aop.OnLogExecuting = (s, p) => Console.WriteLine(s, p); + }); + List< (int id, string name)> x = db.SqlQueryable("select id,name from \"ORDER\"") + .Select<(int id, string name)>().ToList(); +} public class Unitadfafa