Beispiel #1
0
 public ActionResult NewDeckType(DeckType deckType, int playerId = 0)
 {
     if (statsRepository.DeckTypes.Count(x => x.Name == deckType.Name) > 0)
     {
         return(View());
     }
     statsRepository.SaveDeckType(deckType);
     if (playerId == 0)
     {
         return(RedirectToAction("DeckTypesList"));
     }
     else
     {
         return(RedirectToAction("NewRecord", new { playerId }));
     }
 }