public static bool CreateDeck(string deckName, string commanderName) { var commander = CardRepository.GetCardByName(commanderName); if (commander == null) { return(false); } var deck = new DeckDm { Id = 0, DeckName = deckName, Commander = commander }; DeckRepository.InsertDeck(deck); return(true); }