All that is necessary to run the backend solution:
- Visual Studio Community
- .NET 7.0
- Entity Framework Tools
- Any Relation Database
- ExpressSql, it was my choice
- MySQL
- SQLite
- SQL Server
- PostgreSQL
In SuperHeroBacked -> SuperHero.Api
Add database connection string in appSettings.json
"ConnectionStrings": {
"DefaultConnection": "xpto"
}
In SuperHeroBacked -> SuperHero.Api -> Migrations
Execute:
dotnet ef database update
In appSettings.json
Configure:
- Port for application use on
applicationUrl
- If you do not want to start a browser when running set
"launchBrowser": false
"profiles": {
"Default": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7027;http://localhost:5207",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
Run the Default
profile in Visual Studio
Or run via CLI
in folder SuperHero.Api
Execute:
dotnet run