mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add user case test
This commit is contained in:
parent
fddf1de9f3
commit
661db117e1
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
@ -37,6 +38,13 @@ namespace OrmTest
|
||||
|
||||
var list = db.Queryable<UnitAddress011>().Includes(x => x.Persons).Includes(x => x.City).ToList();
|
||||
|
||||
var list2 = db.Queryable<UnitAddress011>().Includes(x => x.Persons
|
||||
.Select(it=>new UnitPerson011() {
|
||||
AddressId=it.AddressId,
|
||||
Id=it.Id,
|
||||
Name=SqlFunc.Subqueryable<UnitPerson011>().Where(x=>x.Id==it.Id).Select(x=>x.Name)
|
||||
}).ToList()).ToList();
|
||||
|
||||
|
||||
db.DeleteNav(address).IncludeByNameString("Persons")
|
||||
.IncludeByNameString("City").ExecuteCommand();
|
||||
|
Loading…
Reference in New Issue
Block a user