mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Update Sqlite
This commit is contained in:
28
Src/Asp.Net/SqliteTest/UnitTest/Setting/MapTable.cs
Normal file
28
Src/Asp.Net/SqliteTest/UnitTest/Setting/MapTable.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using OrmTest.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest.UnitTest
|
||||
{
|
||||
public class MapTable : UnitTestBase
|
||||
{
|
||||
public void Init()
|
||||
{
|
||||
//IsAutoCloseConnection
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
var db = GetInstance();
|
||||
var x = db.Queryable<Student>().ToList();
|
||||
}
|
||||
}
|
||||
public SqlSugarClient GetInstance()
|
||||
{
|
||||
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, DbType = DbType.SqlServer, IsAutoCloseConnection = true });
|
||||
return db;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user