Exemple #1
0
 public creditCard(credit_cards credit_card)
 {
     id             = credit_card.id;
     number         = credit_card.number;
     expirationDate = credit_card.expirationDate;
     idCustomer     = credit_card.idCustomer;
 }
Exemple #2
0
        public void saveCreditCard(credit_cards creditcard)
        {
            //busco el customer
            customers c = context.customers.FirstOrDefault(x => x.userId == creditcard.idCustomer);

            if (c == null)
            {
                return;
            }

            creditcard.idCustomer = c.id;
            context.credit_cards.Add(creditcard);
            context.SaveChanges();
        }