Exemplo n.º 1
0
 public static void Seed(BillsPaymentSystemContext context)
 {
     InsertValues(UsersInitializer.GetUsers(), context);
     InsertValues(CreditCardInitializer.GetCreditCards(), context);
     InsertValues(BankAccountInitializer.GetBankAccounts(), context);
     InsertValues(PaymentMethodInitializer.GetPaymentMethods(), context);
 }
Exemplo n.º 2
0
        private static void InsertCreditCard(BillsPaymentSystemContext context)
        {
            var creditCards = CreditCardInitializer.GeCreditCards();

            for (int i = 0; i < creditCards.Length; i++)
            {
                if (IsValid(creditCards[i]))
                {
                    context.CreditCards.Add(creditCards[i]);
                }
            }
            context.SaveChanges();
        }
Exemplo n.º 3
0
        private static void InsertCreditCards(BillsPaymentSystemContext context)
        {
            var creditCards = CreditCardInitializer.GetCreditCards();

            foreach (var creditCard in creditCards)
            {
                if (IsValid(creditCard))
                {
                    context.CreditCards.Add(creditCard);
                }
            }
            context.SaveChanges();
        }
        private static void InsertCreditCards(BillsPaymentSystemContext context)
        {
            CreditCard[] creditCards = CreditCardInitializer.GetCreditCards();

            for (int index = 0; index < creditCards.Length; index++)
            {
                if (IsValid(creditCards[index]))
                {
                    context.CreditCards.Add(creditCards[index]);
                }
            }

            context.SaveChanges();
        }