exciting-aftermath/Portfolio.Application/Services/PokemonService/PokemonService.cs

37 lines
995 B
C#

using Portfolio.Domain.Features.Articles;
using Portfolio.Domain.Features.Pokemon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace Portfolio.Application.Services.PokemonService
{
public class PokemonService : IPokemonService
{
private readonly IPokemonRepository _pokemonRepository;
public PokemonService(IPokemonRepository pokemonRepository)
{
_pokemonRepository = pokemonRepository;
}
public async Task AddPokemonAsync(Pokemon pokemon)
{
await _pokemonRepository.AddPokemonAsync(pokemon);
}
public async Task DeletePokemonAsync(int pokemonId)
{
await _pokemonRepository.DeletePokemonAsync(pokemonId);
}
public async Task<List<Pokemon>> GetAllPokemonAsync()
{
return await _pokemonRepository.GetAllPokemonsAsync();
}
}
}