public void AddCustomertoDB(string fn, string ln, string phone) { using (var context = new Project1Context(Options)) { var _tempcustomer = new Customers { FirstName = fn, LastName = ln, Phone = phone }; context.Add(_tempcustomer); context.SaveChanges(); } }
//Persisting changes to database public void Save() { s_logger.Info("Saving changes to the database"); _dbContext.SaveChanges(); }