public async Task <IActionResult> OnGet()
        {
            Tribe = await _tribeData.GetTribeById(Id);

            if (Tribe != null)
            {
                var citizen = await _citizenData.GetCitizen();

                LeaderName = citizen.Where(x => x.Id == Tribe.LeaderId).FirstOrDefault()?.Name;
            }

            return(Page());
        }
Ejemplo n.º 2
0
        public async Task OnGet()
        {
            var citizen = await _citizenData.GetCitizen();

            CitizenList = new List <SelectListItem>();

            citizen.ForEach(x =>
            {
                CitizenList.Add(new SelectListItem {
                    Value = x.Id.ToString(), Text = x.Name
                });
            });
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> OnGet()
        {
            Weapon = await _weaponData.GetWeaponById(Id);

            if (Weapon != null)
            {
                var citizen = await _citizenData.GetCitizen();

                CitizenName = citizen.Where(x => x.Id == Weapon.CitizenId).FirstOrDefault()?.Name;
            }

            return(Page());
        }
 public async Task OnGet()
 {
     Citizens = await _citizenData.GetCitizen();
 }