├── Pages
├── Index.razor
├── LoginDisplay.razor
├── Logout.razor
├── Counter.razor
├── FetchData.razor
├── Login.razor
└── Register.razor
├── Models
├── RegisterResult.cs
├── LoginResult.cs
├── LoginModel.cs
└── RegisterModel.cs
├── Service
├── IAuthService.cs
└── AuthService.cs
├── Data
├── ApplicationDbContext.cs
└── Migrations
│ ├── 20230217193849_CreateIdentitySchema.cs
│ ├── ApplicationDbContextModelSnapshot.cs
│ └── 20230217193849_CreateIdentitySchema.Designer.cs
├── Shared
├── MainLayout.razor
├── SurveyPrompt.razor
├── NavMenu.razor
├── NavMenu.razor.css
└── MainLayout.razor.css
├── appsettings.json
├── README.md
├── _Imports.razor
├── App.razor
├── Controllers
├── WeatherForecastController.cs
├── AccountsController.cs
└── LoginController.cs
├── Program.cs
└── Helpers
└── ApiAuthenticationStateProvider.cs
/Pages/Index.razor:
--------------------------------------------------------------------------------
1 | @page "/"
2 |
3 |
Current count: @currentCount
8 | 9 | 10 | 11 | @code { 12 | private int currentCount = 0; 13 | 14 | private void IncrementCount() 15 | { 16 | currentCount++; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |Sorry, there's nothing at this address.
10 |This component demonstrates fetching data from the server.
10 | 11 | @if (forecasts == null) 12 | { 13 |Loading...
14 | } 15 | else 16 | { 17 || Date | 21 |Temp. (C) | 22 |Temp. (F) | 23 |Summary | 24 |
|---|---|---|---|
| @forecast.Date.ToShortDateString() | 31 |@forecast.TemperatureC | 32 |@forecast.TemperatureF | 33 |@forecast.Summary | 34 |
@Error
11 |@error
13 | } 14 |