mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-01 19:03:58 +08:00
-
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
<Compile Include="UnitTest\ExpressionTest\ExpTestBase.cs" />
|
||||
<Compile Include="UnitTest\ExpressionTest\Field.cs" />
|
||||
<Compile Include="UnitTest\Insert.cs" />
|
||||
<Compile Include="UnitTest\Mapping .cs" />
|
||||
<Compile Include="UnitTest\Query\JoinQuery.cs" />
|
||||
<Compile Include="UnitTest\ExpressionTest\Method.cs" />
|
||||
<Compile Include="UnitTest\ExpressionTest\Select.cs" />
|
||||
|
||||
31
OrmTest/UnitTest/Mapping .cs
Normal file
31
OrmTest/UnitTest/Mapping .cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user