24 lines
598 B
C#
24 lines
598 B
C#
using Portfolio.Application.Services.PokemonService;
|
|
using Portfolio.Domain.Features.Pokemon;
|
|
|
|
namespace Portfolio.WebUI.Server.Components.Pages
|
|
{
|
|
public partial class PokemonSleep
|
|
{
|
|
public List<Pokemon> pokemons = new List<Pokemon>();
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var result = await PokemonService.GetAllPokemonAsync();
|
|
if (result is not null)
|
|
{
|
|
pokemons = result;
|
|
pokemons.Sort((x, y) => x.PokemonId.CompareTo(y.PokemonId));
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|