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();
        }
    }
}
