static void UpdateCustomer(string ID) { //var randomRabbitName = Console.ReadLine(); using (var db = new CustomerDbContext()) { var updateCustomer = db.Customers.Find(ID); updateCustomer.Country += "Bolivia"; db.Customers.Update(updateCustomer); db.SaveChanges(); } }
static void AddCustomer() { Random rand = new Random(); var newCustomer = new Customer() { CustomerID = "RABSG", ContactName = "Ross Brown", CompanyName = "Sparta Global", City = "Hemel Hempstead", Country = "UK" }; using (var db = new CustomerDbContext()) { db.Customers.Add(newCustomer); db.SaveChanges(); } }