SqlSugar/Src/Asp.NetCore2/SqlSeverTest/UnitTest/UnitOneToOneNAny.cs

20 lines
526 B
C#
Raw Normal View History

2023-07-10 17:11:51 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OrmTest
{
internal class UnitOneToOneNAny
{
public static void Init()
{
var db = NewUnitTest.Db;
db.CodeFirst.InitTables<EmpLicenseLogOff, EmpInformation, EmpDepartmentJob,EmpLicense>();
db.Queryable<EmpLicenseLogOff>()
.Where(it => it.EmpLicense.EmpInformation.EmpDepartmentJobs.Any(z => z.DepId == 1))
.ToList();
}
}
}