mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-02 03:13:58 +08:00
32 lines
795 B
C#
32 lines
795 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 Mapping:ExpTestBase
|
|
{
|
|
private Mapping() { }
|
|
public Mapping(int eachCount)
|
|
{
|
|
this.Count = eachCount;
|
|
}
|
|
|
|
public void Init() {
|
|
|
|
var db = GetInstance();
|
|
var s1= db.Queryable<Student>().ToSql();
|
|
}
|
|
|
|
public SqlSugarClient GetInstance()
|
|
{
|
|
SqlSugarClient db = new SqlSugarClient(new AttrbuitesCofnig() { ConnectionString = Config.ConnectionString, DbType = DbType.SqlServer, IsAutoCloseConnection = true, EntityNamespace= "OrmTest.Models" });
|
|
return db;
|
|
}
|
|
}
|
|
}
|