mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Updadte Demo
This commit is contained in:
parent
326cffa0bc
commit
bf881059a0
36
Src/Asp.Net/SqlServerTest/BugTest/Bug2.cs
Normal file
36
Src/Asp.Net/SqlServerTest/BugTest/Bug2.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using OrmTest.Models;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OrmTest.BugTest
|
||||||
|
{
|
||||||
|
public class Bug2
|
||||||
|
{
|
||||||
|
public SqlSugarClient DB
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
|
||||||
|
{
|
||||||
|
InitKeyType = InitKeyType.Attribute,
|
||||||
|
ConnectionString = Config.ConnectionString,
|
||||||
|
DbType = DbType.SqlServer,
|
||||||
|
IsAutoCloseConnection = true
|
||||||
|
});
|
||||||
|
return db;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void Init() {
|
||||||
|
var x2= DB.Queryable<School>().Where(x => x.Id == SqlFunc.Subqueryable<School>().Where(y => y.Id == SqlFunc.Subqueryable<Student>().Where(yy => y.Id == x.Id).Select(yy => yy.Id)).Select(y => y.Id)).ToSql();
|
||||||
|
if (!x2.Key.Contains("STudent")) {
|
||||||
|
throw new Exception("bug2 error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -18,7 +18,11 @@ namespace OrmTest
|
|||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
|
||||||
// /***Unit Test***/
|
/***BUG repair test***/
|
||||||
|
new BugTest.Bug1().Init();
|
||||||
|
new BugTest.Bug2().Init();
|
||||||
|
|
||||||
|
/***Unit Test***/
|
||||||
new SqlRemark(2).Init();
|
new SqlRemark(2).Init();
|
||||||
new Select(1).Init();
|
new Select(1).Init();
|
||||||
new Field(1).Init();
|
new Field(1).Init();
|
||||||
@ -56,9 +60,6 @@ namespace OrmTest
|
|||||||
Demo.Mapper.Init();
|
Demo.Mapper.Init();
|
||||||
Demo.ExtEntity.Init();
|
Demo.ExtEntity.Init();
|
||||||
Demo.VersionValidation.Init();
|
Demo.VersionValidation.Init();
|
||||||
|
|
||||||
/***BUG repair test***/
|
|
||||||
new BugTest.Bug1().Init();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="BugTest\Bug2.cs" />
|
||||||
<Compile Include="Models\Brand.cs" />
|
<Compile Include="Models\Brand.cs" />
|
||||||
<Compile Include="BugTest\Bug1.cs" />
|
<Compile Include="BugTest\Bug1.cs" />
|
||||||
<Compile Include="Models\VendorAndBrand.cs" />
|
<Compile Include="Models\VendorAndBrand.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user