public bool DeleteAfflictions(List<AfflictionAreaEntity> request)
        {
            _logger.DebugFormat("DeleteAfflictions with request count: {0}", request.Count);

            using (var db = new MuscleTherapyContext())
            {
                foreach (var afflictionAreaEntity in request)
                {
                    db.Entry(afflictionAreaEntity).State = EntityState.Deleted;
                }

                db.SaveChanges();
            }
            return true;
        }
 public void UpdateNewCustomer(CustomerEntity customer)
 {
     _logger.DebugFormat("Updating new customer");
     using (var db = new MuscleTherapyContext())
     {
         db.Customers.Add(customer);
         db.SaveChanges();
     }
 }
        public void UpdateExistingCustomer(CustomerEntity customer)
        {
            _logger.DebugFormat("Updating Existing customer with customerId: {0}", customer.CustomerId);

            using (var db = new MuscleTherapyContext())
            {
                db.Customers.Attach(customer);
                db.Entry(customer).State = EntityState.Modified;
                db.SaveChanges();
            }
        }