- 增加 RawValueAttribute 实现自定义表达式时,使用原始值传入参数;

- 增加 IEnumerable<(T1, T2)>.ContainsMany 扩展方法,实现自定义表达式解析多列无法 IN 的问题;
This commit is contained in:
28810
2019-12-08 00:03:35 +08:00
parent c942811548
commit 011cc8d0d8
6 changed files with 154 additions and 14 deletions

View File

@@ -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>