You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
757 B
29 lines
757 B
8 years ago
|
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()
|
||
|
{
|
||
6 years ago
|
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, DbType = DbType.MySql, IsAutoCloseConnection = true });
|
||
8 years ago
|
return db;
|
||
|
}
|
||
|
}
|
||
|
}
|