SqlSugar/OrmTest/ExpressionTest/Join.cs

39 lines
974 B
C#
Raw Normal View History

2017-02-26 23:56:28 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2017-02-27 01:03:56 +08:00
using SqlSugar;
using System.Linq.Expressions;
using OrmTest.Models;
2017-02-26 23:56:28 +08:00
namespace OrmTest.ExpressionTest
{
2017-02-27 01:03:56 +08:00
public class Join : ExpTestBase
2017-02-26 23:56:28 +08:00
{
2017-02-27 01:03:56 +08:00
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
});
}
2017-02-26 23:56:28 +08:00
}
}