public async Task <ActionResult <Army> > GetArmy(int id)
        {
            var army = await _armyService.GetOne(id);

            if (army == null)
            {
                return(NotFound());
            }

            return(army);
        }
Exemple #2
0
        // GET: Armies/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            try
            {
                var army = await _armyService.GetOne(id);

                if (army == null)
                {
                    return(NotFound());
                }

                return(View(army));
            }
            catch (Exception)
            {
                return(NotFound());
            }
        }