- 增加 Column 特性 RewriteSql 重读功能;

This commit is contained in:
2881099
2020-12-21 21:03:43 +08:00
parent 76e8b3efce
commit e5452ad43f
10 changed files with 72 additions and 75 deletions

View File

@ -116,14 +116,17 @@ namespace FreeSql.DataAnnotations
/// </summary>
public int Scale { get => _Scale ?? 0; set => _Scale = value; }
///// <summary>
///// 写入格式化,比如 geography::STGeomFromText({0},4236)
///// </summary>
//public string AuditWriteSql { get; set; }
/// <summary>
/// 设置重读功能<para></para>
/// [Column(RereadSql = &quot;{0}.STAsText()&quot;)]<para></para>
/// 查询SELECT a.[id], a.[geo].STAsText() FROM table a
/// 重写功能<para></para>
/// 比如:[Column(RewriteSql = &quot;geography::STGeomFromText({0},4236)&quot;)]<para></para>
/// 插入INSERT INTO [table]([geo]) VALUES(geography::STGeomFromText('...',4236))<para></para>
/// 提示:更新也生效
/// </summary>
public string RewriteSql { get; set; }
/// <summary>
/// 重读功能<para></para>
/// 比如:[Column(RereadSql = &quot;{0}.STAsText()&quot;)]<para></para>
/// 查询SELECT a.[id], a.[geo].STAsText() FROM [table] a
/// </summary>
public string RereadSql { get; set; }
}