Example #1
0
        private static void GenertateEFData()
        {
            if (_context == null)
            {
                _context = new BillingCustomerContextTest();

                if (!_context.Customers.Any())
                {
                    foreach (var customer in InMemoryCustomers)
                    {
                        _context.Customers.Add(customer);
                    }

                    foreach (var billing in InMemoryBillings)
                    {
                        _context.Billings.Add(billing);
                    }

                    _context.SaveChanges();
                }
            }
        }
Example #2
0
        private static void GenertateEFData()
        {
            if (_context == null)
            {
                _context = new BillingCustomerContextTest();

                if (!_context.Customers.Any())
                {
                    foreach (var customer in InMemoryCustomers)
                    {
                        _context.Customers.Add(customer);
                    }

                    foreach (var billing in InMemoryBillings)
                    {
                        _context.Billings.Add(billing);
                    }

                    _context.SaveChanges();
                }
            }
        }