simple-web-app-mvc-dotnet
Simple Web App MVC (C#, ASP.NET 9.0, MVC, Entity Framework ORM, Identity)
GCP (Google Cloud Platform)
https://dotnet.g*cp.j*amm*ary.com/
How to get started locally
Clone the git repo.
git clone https://github**.c*om/adamajammary/simple-web-app-mvc-dotnet.gitCreate a new appsettings file for local development.
cp -f "SimpleWebAppMVCappsettings.json" "SimpleWebAppMVCappsettings.Development.json"Update your new appsettings file.
{
"UseMySQL": false,
"ConnectionStrings": {
"DbConnection": "Server=(localdb)\mssqllocaldb;Trusted_Connection=True;Database=SimpleWebAppMVC"
},
"Token": {
"Audience": "http://localhos*t**:57968/",
"Issuer": "http://localhos*t**:57968/",
"Key": "d8fd8fb0-2dcb-4b12-892f-2eab015f246a"
},
}Change working directory to the SimpleWebAppMVC project.
cd SimpleWebAppMVCCheck if dependent nuget packages are installed.
dotnet list packageInstall dependent nuget packages (if necessary).
dotnet restoreDatabase Migration
https://learn.micro**sof*t.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli#create-your-database-and-schema
Visual Studio Package Manager Console (PMC)
Apply the Database migration in PMC.
Update-DatabaseEntity Framework Core .NET CLI
Install the CLI tools (if not already installed).
https://learn.m*i*cr*osoft.com/en-us/ef/core/cli/dotnet#installing-the-tools
dotnet tool install --global dotnet-efApply the Database migration using the CLI.
dotnet ef database updateVisual Studio
When you start the project in Visual Studio you will be asked to trust the IIS Express SSL certificate for Hot Reload purposes. You can choose to install the root certificate if you want, but it's not necessary to run the project in Development mode (since it uses HTTP and no SSL certificate is needed).
通过命令行克隆项目: