public void LogError(Exception ex)
        {
            using (db = new LoyayContext())
            {
                ErrorLog log = new ErrorLog()
                {
                    ErrorTime    = DateTime.Now,
                    ErrorSource  = "Card Holder Website",
                    ErrorMessage = ex.Message,
                    ModuleName   = ex.Source,
                    TargetSite   = ex.TargetSite.ToString(),
                    StackTrace   = ex.StackTrace
                };

                db.ErrorLog.Add(log);
                db.SaveChanges();
            }
        }
        // Adds mobile number to Card record if different than record (at Verification Input for customer to confirm/change mobile number)
        public Card UpdateCardMobileNumber(Card card)
        {
            using (LoyayContext context = new LoyayContext())
            {
                var dbCard = context.Cards.SingleOrDefault(c => c.CardID == card.CardID);
                dbCard.CH_MPHONE = card.CH_MPHONE;
                context.SaveChanges();

                if (CheckForLDROptIn(card) == 0)
                {
                    return(card);
                }
                else
                {
                    RedirectToAction("PriorSignIn", "Home", card);
                    return(card);
                }
            }
        }