mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
27 lines
684 B
C#
27 lines
684 B
C#
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 : ExpTestBase
|
|
{
|
|
public void Init()
|
|
{
|
|
using (var db = GetInstance())
|
|
{
|
|
var x= db.Queryable<Student>().ToList();
|
|
}
|
|
}
|
|
public SqlSugarClient GetInstance()
|
|
{
|
|
SqlSugarClient db = new SqlSugarClient(new SystemTablesConfig() { ConnectionString = Config.ConnectionString, DbType = DbType.SqlServer, IsAutoCloseConnection = true });
|
|
return db;
|
|
}
|
|
}
|
|
}
|