Quantcast
Channel: EntityFramework Reverse POCO Code First Generator
Viewing all articles
Browse latest Browse all 1642

Commented Issue: DbContext: No new line after each property "public DbSet" [148]

$
0
0
When the tool generates a DBContext, it does not make new line after each property in it, so it will list all properties in one long line, e.g.:
public DbSet<table1> table1s { get; set; } public DbSet<table2> table2s { get; set; } public DbSet<table3> table3s { get; set; }

__instead of:__
public DbSet<table1> table1s { get; set; }
public DbSet<table2> table2s { get; set; }
public DbSet<table3> table3s { get; set; }

It might be because of these lines in file "EF.Reverse.POCO.ttinclude":
public DbSet<<#=tbl.NameHumanCase#>> <#=Inflector.MakePlural(tbl.NameHumanCase)#> { get; set; }<#if(IncludeComments){#> // <#=tbl.Name#>
<# } else { #>
<# } #>
<# } #>

which if changed to the following:
public DbSet<<#=tbl.NameHumanCase#>> <#=Inflector.MakePlural(tbl.NameHumanCase)#> { get; set; }<#if(IncludeComments){#> // <#=tbl.Name#>
<# } else { #>

<# } #>
<# } #>

by adding an empty new line after "<# } else { #>", will solve the issue.
Comments: I'll add the extra line in, but it makes no difference to me if I've got comments on / off.

Viewing all articles
Browse latest Browse all 1642

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>