This commit is contained in:
sunkaixuan 2023-10-29 14:42:25 +08:00
parent 0a95b319f2
commit 6365e0e846
2 changed files with 23 additions and 0 deletions

View File

@ -97,6 +97,15 @@ namespace OrmTest
.Select(o => o.Id))
.OrderBy("id desc")
.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 ####");
}

View 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;
}
}
}