mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-26 02:09:37 +08:00
Add demo
This commit is contained in:
@@ -97,6 +97,15 @@ namespace OrmTest
|
|||||||
.Select(o => o.Id))
|
.Select(o => o.Id))
|
||||||
.OrderBy("id desc")
|
.OrderBy("id desc")
|
||||||
.ToPageList(1, 10);
|
.ToPageList(1, 10);
|
||||||
|
|
||||||
|
var methodInfo = typeof(UnitTool).GetMethod("GetName");
|
||||||
|
|
||||||
|
var list8 = db.Queryable<Order>()
|
||||||
|
.Select(it => new
|
||||||
|
{
|
||||||
|
n = it.Name,
|
||||||
|
name = SqlFunc.OnlyInSelectConvertToString(it.Name, methodInfo)
|
||||||
|
}).ToList();
|
||||||
Console.WriteLine("#### Examples End ####");
|
Console.WriteLine("#### Examples End ####");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
14
Src/Asp.NetCore2/SqlSeverTest/UnitTest/UnitTool.cs
Normal file
14
Src/Asp.NetCore2/SqlSeverTest/UnitTest/UnitTool.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
internal class UnitTool
|
||||||
|
{
|
||||||
|
public static string GetName(string name)
|
||||||
|
{
|
||||||
|
return "name" + 111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user