mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
-
This commit is contained in:
parent
404cd9c3ba
commit
c3b3d4e71f
@ -72,6 +72,8 @@
|
||||
<Compile Include="Models\Student.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UnitTest\RenameMapping\MapColumn.cs" />
|
||||
<Compile Include="UnitTest\RenameMapping\MapTable.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
@ -82,9 +84,7 @@
|
||||
<Name>SqlSugar</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="UnitTest\RenameMapping\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -19,13 +19,13 @@ namespace OrmTest
|
||||
{
|
||||
//Unit Test
|
||||
int eachCount = 1;
|
||||
new Field(eachCount).Init();
|
||||
new Where(eachCount).Init();
|
||||
new Method(eachCount).Init();
|
||||
new JoinQuery(eachCount).Init();
|
||||
new SingleQuery(eachCount).Init();
|
||||
new SelectQuery(eachCount).Init();
|
||||
|
||||
//new Field(eachCount).Init();
|
||||
//new Where(eachCount).Init();
|
||||
//new Method(eachCount).Init();
|
||||
//new JoinQuery(eachCount).Init();
|
||||
//new SingleQuery(eachCount).Init();
|
||||
//new SelectQuery(eachCount).Init();
|
||||
new MapTable().Init();
|
||||
|
||||
//Performance Test
|
||||
for (int i = 0; i < 100; i++)
|
||||
|
18
OrmTest/UnitTest/RenameMapping/MapColumn.cs
Normal file
18
OrmTest/UnitTest/RenameMapping/MapColumn.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest.UnitTest
|
||||
{
|
||||
public class MapColumn : ExpTestBase
|
||||
{
|
||||
public SqlSugarClient GetInstance()
|
||||
{
|
||||
SqlSugarClient db = new SqlSugarClient(new SystemTablesConfig() { ConnectionString = Config.ConnectionString, DbType = DbType.SqlServer });
|
||||
return db;
|
||||
}
|
||||
}
|
||||
}
|
26
OrmTest/UnitTest/RenameMapping/MapTable.cs
Normal file
26
OrmTest/UnitTest/RenameMapping/MapTable.cs
Normal file
@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
@ -57,13 +57,13 @@
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableAccessory.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableExtendsions.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableProvider.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\DeleteBuilder.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\InsertBuilder.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\QueryBuilder.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\SqlQueryBuilder.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\UpdateBuilder.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\SqlBuilderAccessory.cs" />
|
||||
<Compile Include="Abstract\SqlBuilderProvider\SqlBuilderProvider.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\DMLBuilder\DeleteBuilder.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\DMLBuilder\InsertBuilder.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\DMLBuilder\QueryBuilder.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\DMLBuilder\SqlQueryBuilder.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\DMLBuilder\UpdateBuilder.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\SqlBuilderAccessory.cs" />
|
||||
<Compile Include="Abstract\DbProvider\SqlBuilderProvider\SqlBuilderProvider.cs" />
|
||||
<Compile Include="Common\CacheManager.cs" />
|
||||
<Compile Include="Common\Check.cs" />
|
||||
<Compile Include="Common\CommonExtensions.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user