public ActionResult AddToCollection(AddCardToCollectionModel model) { bool result = false; try { result = collectionManager.AddCardToMyCollection(User.Identity.Name, model.CardToAdd.CardName, model.CardLocation); } catch (Exception ex) { throw ex; } return(RedirectToAction("Index", "Collection")); }
/// <summary> /// Jory A. Wernette /// Created: 2021/05/10 /// /// Allows a Player to get to the page to add to the list /// of their collection records in the DB /// </summary> public ActionResult AddToCollection(string cardName) { Card cardToAdd = new Card(); AddCardToCollectionModel cardToAddModel = new AddCardToCollectionModel(); try { cardToAdd = cardManager.SelectCardByCardName(cardName); cardToAddModel.CardToAdd = cardToAdd; } catch (Exception ex) { throw ex; } return(View(cardToAddModel)); }