This project is an attempt to update the sample app from Valerio De Sanctis' book ASP.NET Core and Angular 2 so that it uses latest beta versions of OpenIddict. The sample code in the book relies on OpenIddict 1.0.0-alpha2-0419, which is no longer available. The latest version of OpenIddict at the moment (April 2017) is 1.0.0-beta2-0559, which includes substantial changes since the Alpha version, including the removal of the OpenIddictDbContext class.
In the process of updating, I also went ahead and moved to Angular 2.4, Typescript 2.2, and the latest .csproj-based dotnet tooling.
- Clone the repository:
git clone https://github.com/astegmaier/OpenGamesListWebApp_Chapter10-updated.git
- Move to the root directory, and restore nuget packages:
dotnet restore
- Install npm packages:
npm install
- Install gulp if it isn't installed already:
npm install -g gulp
- Use gulp to build the client app (using the included gulpfile.js) in the client.
gulp
- Switch to "Development Mode" in the command line:
set ASPNETCORE_ENVIRONMENT=Development
- Make sure you have a local development SQL Server available (This is typically installed with Visual Studio) that can be accessed with the connection string stored in appsettings.json.
- Use migrations to create the development database and populate it correctly:
dotnet ef migrations add FirstMigration
dotnet ef database update
- Start the application. This should seed the database automatically.
dotnet run