mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
-
This commit is contained in:
@@ -3,10 +3,36 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using SqlSugar;
|
||||
using System.Linq.Expressions;
|
||||
using OrmTest.Models;
|
||||
namespace OrmTest.ExpressionTest
|
||||
{
|
||||
public class Join
|
||||
public class Join : ExpTestBase
|
||||
{
|
||||
private Join() { }
|
||||
public Join(int eachCount)
|
||||
{
|
||||
this.Count = eachCount;
|
||||
}
|
||||
internal void Init()
|
||||
{
|
||||
base.Begin();
|
||||
for (int i = 0; i < base.Count; i++)
|
||||
{
|
||||
Q2();
|
||||
}
|
||||
base.End("Method Test");
|
||||
}
|
||||
|
||||
public void Q2()
|
||||
{
|
||||
ExpressionContext contet = new ExpressionContext();
|
||||
SqlSugarClient db = new SqlSugarClient(new SystemTablesConfig() { ConnectionString="x" ,DbType= DbType.SqlServer });
|
||||
db.Queryable<Student, School>((st,sc)=> new object[] {
|
||||
JoinType.Left,st.SchoolId==sc.Id
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -22,6 +22,7 @@ namespace OrmTest
|
||||
new OrmTest.ExpressionTest.Field(eachCount).Init();
|
||||
new OrmTest.ExpressionTest.Where(eachCount).Init();
|
||||
new OrmTest.ExpressionTest.Method(eachCount).Init();
|
||||
new OrmTest.ExpressionTest.Join(eachCount).Init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user