Ejemplo n.º 1
0
        public IActionResult ByRace(string race)
        {
            var model = new ListAllStarshipsViewModel();

            model.AllShips = this.starshipsService.GetAllStarshipsByRace(race);
            return(this.View(model));
        }
Ejemplo n.º 2
0
        public IActionResult Own()
        {
            var applicationUserId = this.userManager.GetUserId(this.User);
            var playerId          = this.playersService.GetPlayerId(applicationUserId);
            var model             = new ListAllStarshipsViewModel {
                AllShips = this.starshipsService.GetStarshipsPerPlayer(playerId)
            };

            return(this.View(model));
        }