Skip to content

Commit abd3106

Browse files
authored
Merge pull request #97 from TrackableEntities/update-ef-core
Update to EF Core 3.1
2 parents 013219a + d937787 commit abd3106

File tree

21 files changed

+92
-48
lines changed

21 files changed

+92
-48
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Scaffold EF Core models using Handlebars templates.
66

77
## Prerequisites
88

9-
- [Visual Studio 2019](https://www.visualstudio.com/downloads/) 16.3 or greater.
10-
- The .[NET Core 3.0 SDK](https://www.microsoft.com/net/download/core).
9+
- [Visual Studio 2019](https://www.visualstudio.com/downloads/) 16.4 or greater.
10+
- The .[NET Core 3.1 SDK](https://www.microsoft.com/net/download/core).
1111

1212
## Database Setup
1313

1414
1. Use SQL Server Management Studio to connect to SQL Server
1515
- The easiest is to use **LocalDb**, which is installed with Visual Studio.
1616
Connect to: `(localdb)\MsSqlLocalDb`.
1717
- Create a new database named **NorthwindSlim**.
18-
- Download the data file from <http://bit.ly/northwindslim>.
18+
- Download the data file from <http://bit.ly/northwind-slim>.
1919
- Unzip **NorthwindSlim.sql** and run the script to create tables and populate them with data.
2020

2121
## Usage
2222

2323
1. Create a new **.NET Core** class library.
24-
- If necessary, edit the csproj file to update the **TargetFramework** to 3.0.
24+
- If necessary, edit the csproj file to update the **TargetFramework** to 3.1.
2525

2626
> **Note**: Using the EF Core toolchain with a _.NET Standard_ class library is currently not supported. Instead, you can add a .NET Standard class library to the same solution as the .NET Core library, then add existing items and select **Add As Link** to include entity classes.
2727
@@ -253,7 +253,7 @@ public class ScaffoldingDesignTimeServices : IDesignTimeServices
253253

254254
- Install the global `dotnet ef` tool.
255255
```
256-
dotnet tool install --global dotnet-ef --version 3.0.0-*
256+
dotnet tool install --global dotnet-ef --version 3.1.0-*
257257
```
258258
- Open a command prompt at the project root and execute:
259259
```

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.0.101"
3+
"version": "3.1.100"
44
}
55
}

sample/ScaffoldingSample.Api/ScaffoldingSample.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

sample/ScaffoldingSample.Embedded/ScaffoldingSample.Embedded.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0" />
9+
<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>
1114
</ItemGroup>
1215

1316
<ItemGroup>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
using System;
22
using Microsoft.EntityFrameworkCore;
33
using Microsoft.EntityFrameworkCore.Metadata;
4+
{{#if model-namespace}}
5+
using {{model-namespace}};
6+
{{/if}}

sample/ScaffoldingSample.TypeScript/ScaffoldingSample.TypeScript.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0">
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
1111
<PrivateAssets>all</PrivateAssets>
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
</PackageReference>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System;
22
using Microsoft.EntityFrameworkCore;
33
using Microsoft.EntityFrameworkCore.Metadata; // Comment
4-
using {{models-namespace}};
4+
{{#if model-namespace}}
5+
using {{model-namespace}};
6+
{{/if}}

sample/ScaffoldingSample/Sample.ReadMe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Demonstrates how to reverse engineer an existing database using the EF Core tool
44

55
## Prerequisites
66

7-
- [Visual Studio 2019](https://www.visualstudio.com/downloads/) 16.3 or greater.
8-
- The .[NET Core 3.0 SDK](https://www.microsoft.com/net/download/core).
7+
- [Visual Studio 2019](https://www.visualstudio.com/downloads/) 16.4 or greater.
8+
- The .[NET Core 3.1 SDK](https://www.microsoft.com/net/download/core).
99

1010
## Database Setup
1111

1212
- Use SQL Server Management Studio to connect to SQL Server
1313
- The easiest is to use **LocalDb**, which is installed with Visual Studio.
1414
Connect to: `(localdb)\MsSqlLocalDb`.
1515
- Create a new database named **NorthwindSlim**.
16-
- Download the data file from <http://bit.ly/northwindslim>.
16+
- Download the data file from <http://bit.ly/northwind-slim>.
1717
- Unzip **NorthwindSlim.sql** and run the script to create tables and populate them with data.
1818

1919
## Setup
@@ -156,7 +156,7 @@ public partial class NorthwindSlimContext
156156

157157
- Install the global `dotnet ef` tool.
158158
```
159-
dotnet tool install --global dotnet-ef --version 3.0.0-*
159+
dotnet tool install --global dotnet-ef --version 3.1.0-*
160160
```
161161
- Open a command prompt at the **ScaffoldingSample** project root and execute:
162162
```

sample/ScaffoldingSample/ScaffoldingSample.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0" />
9+
<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>
1114
</ItemGroup>
1215

1316
<ItemGroup>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
using System;
22
using Microsoft.EntityFrameworkCore;
33
using Microsoft.EntityFrameworkCore.Metadata;
4+
{{#if model-namespace}}
5+
using {{model-namespace}};
6+
{{/if}}

0 commit comments

Comments
 (0)