https://github.com/dotnet-architecture/eShopOnWeb
https://docs.microsoft.com/en-us/dotnet/standard/modern-web-apps-azure-architecture/
https://github.com/dotnet-architecture/eShopOnWeb/wiki/Getting-Started-for-Beginners
Select the following workloads/individual components:
- ASP.NET and web development
- .NET cross platofrm development
- .NET Core 2.2
Note the following deviations:
-
Add code to
Program.cs
to create database: -
Import statements
using Microsoft.Extensions.DependencyInjection; using WebApplication1.Models;
-
Change
var context = services.GetRequiredService<SchoolContext>();
should bevar context = services.GetRequiredService<AppDbContext>();
Note the following deviations:
-
Add an API controller
-
Choose the model class
WebApplication1.Models.Game
-
Publish
-
Create New
1. Add a SQL Server
1. Create
1. Connection String Name = DefaultConnection
-
Update connection string
-
In addition to changing the connection string name in appsettgins.json, also change in
Startup.cs
git clone https://github.com/dotnet-architecture/eShopOnWeb.git
devenv eShopOnWeb\eShopOnWeb.sln
Note the following deviations:
- As a pre-requisitem enable shared drives in
Docker Desktop > Settings > Shared Drives
and enable the drive containing the project source - When following steps 3 and 4, selecting
Web project > Add > Docker Support
will not create a new project called docker-compopse, instead it will: - create a new
Web\Dockerfile
, and - backup the old one to
Web\Dockerfile.original