Skip to content

Commit 7503116

Browse files
authored
Merge pull request #166 from newmedicine/master
Allow spaces in column names
2 parents 58fffc5 + 726b584 commit 7503116

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Dapper.SimpleCRUD.ModelGenerator/Content/Models/ModelGenerator.tt.pp

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
{#>
7272
<# if (tbl.IsPrimaryKeyColumn(col.PropertyName)) { #>
7373
[Key]
74+
<#}#><# if (col.PropertyName.Contains("_")) { #>
75+
[Column("<#=col.PropertyName.Replace("_"," ")#>")]
7476
<#}#>
7577
public virtual <#=col.PropertyType #><#=CheckNullable(col)#> <#=col.PropertyName #> { get; set; }
7678
<#}#>

0 commit comments

Comments
 (0)