// GET: Attack public ActionResult Index() { var service = new AttackService(); var model = service.GetAllAttacks(); return(View(model)); }
//Get: AddAttackToCard public ActionResult AddAttack(string cardId) { var cardService = new CardService(); var cardModel = cardService.GetCardById(cardId); var attackService = new AttackService(); ViewBag.AttackId = new SelectList(attackService.GetAllAttacks().ToList(), "AttackId", "Name"); return(View(cardModel)); }