using CityInfo.WEB.Models; using CityInfo.WEB.Services; using Microsoft.AspNetCore.Components; namespace CityInfo.WEB.Pages { public partial class PointOfInterestEdit { [Inject] public IPointOfInterestDataService PointOfInterestDataService { get; set; } = default!; [Inject] public ICityDataService CityDataService { get; set; } = default!; [Inject] public NavigationManager NavigationManager { get; set; } = default!; [Parameter] public int CityId { get; set; } [Parameter] public int PointOfInterestId { get; set; } public PointOfInterest? PointOfInterest { get; set; } protected async override Task OnInitializedAsync() { PointOfInterest = await PointOfInterestDataService.GetPointOfInterest(CityId, PointOfInterestId); if (PointOfInterest == null) { NavigationManager.NavigateTo("not-found"); return; } } private async Task HandleValidSubmit() { } private async Task HandleInvalidSubmit() { } } }