Пример #1
0
        /// <summary>
        ///
        /// </summary>
        public void SeedCustomers()
        {
            string customerData = System.IO.File.ReadAllText("Data/CustomerSeedData.json");
            var    customers    = JsonConvert.DeserializeObject <List <CustomerModel> >(customerData);

            _customerDbContext.AddRange(customers);
            _customerDbContext.SaveChanges();
        }