动软生成器添加Mysql注释
1.解决没有mysql注释问题
替换原文件下载地址
2.更新Models模板
<#@ template language="c#" HostSpecific="True" #> <#@ output extension= ".cs" #> <# TableHost host = (TableHost)(Host); host.Fieldlist.Sort(CodeCommon.CompareByintOrder); #> using Dapper.Extension; using System; using System.Text; using System.Collections.Generic; using System.Data; using Newtonsoft.Json; namespace <#= host.NameSpace #>.Models<# if( host.Folder.Length > 0) {#>.<#= host.Folder #><# } #> { <# if( host.TableDescription.Length > 0) {#> //<#= host.TableDescription #> <# } #> [Table("<#= host.GetModelClass(host.TableName) #>")] public class <#= host.GetModelClass(host.TableName) #> { <# foreach (ColumnInfo c in host.Fieldlist) { #> /// <summary> /// <#= string.IsNullOrEmpty(c.Description) ? c.ColumnName : c.Description #> /// </summary> [JsonProperty("<#= c.ColumnName.ToString().ToLower() #>")] public <#= CodeCommon.DbTypeToCS(c.TypeName) #> <#= c.ColumnName.Substring(0,1).ToUpper() c.ColumnName.Substring(1) #>{ get; set; } <# } #> } }
转载:https://www.cnblogs.com/Jerrycjc/p/9176885.html
温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/SQL/11925.html
- 上一篇:MSSQL 删除重复并只保留一条
- 下一篇:access数据库在线生成xls电子表格