Ejemplo n.º 1
0
        public async Task <ActionResult <Army> > DeleteArmy(int id)
        {
            var army = await _armyService.GetOne(id);

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

            await _armyService.Delete(army);

            return(army);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _armyService.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }