Browse Source

Update demo

pull/40/head
sunkaixuan 1 year ago
parent
commit
14a86dcf62
  1. 16
      Src/Asp.NetCore2/Net7Test/NET7Test/NET7Test/Program.cs

16
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<object>("select id,name from \"ORDER\"")
.Select<(int id, string name)>().ToList();
}
public class Unitadfafa

Loading…
Cancel
Save