Skip to content

Commit 27f25af

Browse files
author
Anthony Sneed
committed
Move DbOnConfiguring.hbs, DbContext.hbs to samples.
1 parent 0ddf2be commit 27f25af

File tree

8 files changed

+25
-12
lines changed

8 files changed

+25
-12
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{> dbimports}}
2+
3+
namespace {{namespace}}
4+
{ // Comment
5+
public partial class {{class}} : DbContext
6+
{
7+
{{{> dbsets}}}
8+
{{#if entity-type-errors}}
9+
{{#each entity-type-errors}}
10+
{{spaces 8}}{{{entity-type-error}}}
11+
{{/each}}
12+
13+
{{/if}}
14+
15+
{{{> dbconstructor}}}
16+
17+
{{{> dbonconfiguring}}}
18+
19+
{{{on-model-creating}}}
20+
}
21+
}

sample/ScaffoldingSample.TypeScript/ScaffoldingSample.TypeScript.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
11-
<PrivateAssets>all</PrivateAssets>
12-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
13-
</PackageReference>
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0" />
1411
</ItemGroup>
1512

1613
<ItemGroup>

sample/ScaffoldingSample/CodeTemplates/CSharpDbContext/DbContext.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace {{namespace}}
1414

1515
{{{> dbconstructor}}}
1616

17+
{{{> dbonconfiguring}}}
18+
1719
{{{on-model-creating}}}
1820
}
1921
}

sample/ScaffoldingSample/ScaffoldingSample.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
11-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
12-
<PrivateAssets>all</PrivateAssets>
13-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14-
</PackageReference>
11+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0" />
1512
</ItemGroup>
1613

1714
<ItemGroup>

src/EntityFrameworkCore.Scaffolding.Handlebars/CodeTemplates/CSharpDbContext/DbContext.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ namespace {{namespace}}
1414

1515
{{{> dbconstructor}}}
1616

17-
{{{> dbonconfiguring}}}
18-
1917
{{{on-model-creating}}}
2018
}
2119
}

src/EntityFrameworkCore.Scaffolding.Handlebars/CodeTemplates/TypeScriptDbContext/DbContext.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ namespace {{namespace}}
1414

1515
{{{> dbconstructor}}}
1616

17-
{{{> dbonconfiguring}}}
18-
1917
{{{on-model-creating}}}
2018
}
2119
}

0 commit comments

Comments
 (0)