using BlazorTp1.Components; using BlazorTp1.Models; using Microsoft.AspNetCore.Components; namespace BlazorTp1.Pages { public partial class Index { [Inject] public IDataService DataService { get; set; } public List Items { get; set; } = new List(); private List Recipes { get; set; } = new List(); protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); Items = await DataService.List(0, await DataService.Count()); Recipes = await DataService.GetRecipes(); } } }