mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-09-18 01:15:34 +08:00
- 增加 RawValueAttribute 实现自定义表达式时,使用原始值传入参数;
- 增加 IEnumerable<(T1, T2)>.ContainsMany 扩展方法,实现自定义表达式解析多列无法 IN 的问题;
This commit is contained in:
@@ -13,6 +13,13 @@ namespace FreeSql.DataAnnotations
|
||||
public class ExpressionCallAttribute : Attribute
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// 自定义表达式函数解析的时候,指定参数不解析 SQL,而是直接传进来
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Parameter)]
|
||||
public class RawValueAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
public class ExpressionCallContext
|
||||
{
|
||||
@@ -37,6 +44,11 @@ namespace FreeSql.DataAnnotations
|
||||
/// </summary>
|
||||
public List<DbParameter> UserParameters { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 将 c# 对象转换为 SQL
|
||||
/// </summary>
|
||||
public Func<object, string> FormatSql { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回表达式函数表示的 SQL 字符串
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user