Adding a Blazor WASM app
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using CityInfo.WEB.Models;
|
||||
using CityInfo.WEB.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace CityInfo.WEB.Pages
|
||||
{
|
||||
public partial class CitiesOverview
|
||||
{
|
||||
[Inject]
|
||||
public ICityDataService CityDataService { get; set; } = default!;
|
||||
public IEnumerable<City> Cities { get; set; }
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
Cities = await CityDataService.GetCities();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user