Add unit test

This commit is contained in:
sunkaixuan 2023-03-08 16:04:27 +08:00
parent 144a5fae00
commit 2623007a25

View File

@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using SqlSugar; using SqlSugar;
using SqlSugarDemo;
namespace OrmTest namespace OrmTest
{ {
public class CrossDatabase02 public class CrossDatabase02
@ -40,6 +42,10 @@ namespace OrmTest
db.Aop.OnLogExecuting = (s1, p1) => Console.WriteLine(s1); db.Aop.OnLogExecuting = (s1, p1) => Console.WriteLine(s1);
var x2 = db.QueryableWithAttr<OptRole>() var x2 = db.QueryableWithAttr<OptRole>()
.Where(it => it.Roleinfo.id == 101).ToList(); .Where(it => it.Roleinfo.id == 101).ToList();
var x3 = db.QueryableWithAttr<OptRole>()
.LeftJoin<Role>((x1, y1) => x1.roleId == y1.id).ToSql();
} }
/// <summary> /// <summary>
/// 描述: /// 描述: