示例#1
0
        public IActionResult ByRace(string race)
        {
            var model = new ListAllStarshipsViewModel();

            model.AllShips = this.starshipsService.GetAllStarshipsByRace(race);
            return(this.View(model));
        }
示例#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));
        }