Example #1
0
 public HomeViewModel GetHomeViewModel()
 {
     return(new HomeViewModel()
     {
         Pokemons = _pokemonRepo.GetAll(),
         Trainers = _trainerRepo.GetAll()
     });
 }
Example #2
0
 public IEnumerable <Pokemon> GetAll()
 {
     return(_repository.GetAll());
 }
Example #3
0
 public IList <PokemonModel> GetAll()
 {
     return(pokemonRepository.GetAll().Select(x => new PokemonModel(x)).ToList());
 }
        // GET: PokemonController
        public IActionResult Index()
        {
            var model = _repository.GetAll();

            return(View(model));
        }
Example #5
0
 public async Task <List <PokemonEntity> > GetPokemonsAsync()
 {
     return(await _pokemonRepository.GetAll());
 }
Example #6
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            List <Pokemon> items = await _repository.GetAll();

            return(View(items));
        }
Example #7
0
        public async Task <IActionResult> Index()
        {
            List <Pokemon> data = await _repository.GetAll();

            return(View(data));
        }
 public IActionResult Get()
 {
     return(Ok(_repository.GetAll()));
 }
Example #9
0
 public async Task <IActionResult> GetAllPokemons()
 {
     return(Ok(await _pokemonRepository.GetAll()));
 }