mirror of
				https://gitee.com/dotnetchina/SqlSugar.git
				synced 2025-10-31 16:36:50 +08:00 
			
		
		
		
	Add demo
This commit is contained in:
		| @@ -4,6 +4,7 @@ using System.Collections.Generic; | ||||
| using System.Linq.Dynamic.Core; | ||||
| using System.Linq.Dynamic.Core.CustomTypeProviders; | ||||
| using System.Text; | ||||
| using static OrmTest.UnitOneToManyFiltersadfa; | ||||
|  | ||||
| namespace OrmTest | ||||
| { | ||||
| @@ -128,8 +129,24 @@ namespace OrmTest | ||||
|                 .Where("it", $"SqlFunc.Exists(it.Address.Id)") | ||||
|                 .OrderBy((it, y) => it.Id) | ||||
|                 .ToList(); | ||||
|  | ||||
|               | ||||
|             //Select实现返回导航属性 | ||||
|             var list66 = db.Queryable<UnitPerson011>() | ||||
|                  .Includes(it => it.Address) | ||||
|             .Select(it => new | ||||
|                  { | ||||
|                      addid=it.Address.Id, | ||||
|                      Address =it.Address | ||||
|                  }).ToList(); | ||||
|             var list666 = db.Queryable<UnitPerson011>() | ||||
|                      .Includes(it=>it.Address) | ||||
|                      .Select("it", | ||||
|                       new List<string>() | ||||
|                       {   | ||||
|                             " it.Address.Id as addid" , | ||||
|                             "it.Address as Address" | ||||
|                           } | ||||
|                        ) | ||||
|                      .ToList();   | ||||
|             var xxx = DynamicCoreHelper.GetMember(typeof(UnitPerson011), typeof(int), "it", $"it.Address.Id "); | ||||
|             var list7= db.Queryable<UnitPerson011>().Select<int>("it", $"it.Address.Id ",typeof(UnitPerson011), typeof(int)).ToList(); | ||||
|             var list8 = db.Queryable<Order>().Select("it", $"new(it.Id as Id, it.Name)", typeof(Order)).ToList(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sunkaixuan
					sunkaixuan