- 增加 ExpressionCallAttribute 特性,实现表达式函数自定义解析;

This commit is contained in:
28810
2019-11-20 13:32:49 +08:00
parent 91f0bb92a1
commit d42b2fc2b8
6 changed files with 266 additions and 160 deletions

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace FreeSql.DataAnnotations
{
/// <summary>
/// 自定义表达式函数解析<para></para>
/// 注意:请使用静态扩展类
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class ExpressionCallAttribute : Attribute
{
}
public class ExpressionCallContext
{
/// <summary>
/// 数据库类型,可用于适配多种数据库环境
/// </summary>
public DataType DataType { get; set; }
/// <summary>
/// 已解析的表达式中参数内容
/// </summary>
public Dictionary<string, string> Values { get; } = new Dictionary<string, string>();
}
}