Esempio n. 1
0
        public bool RemoveCustomer(int customerId)
        {
            Customer customer = customers.Find(x => x.Id == customerId);

            if (customer == null)
            {
                return(false);
            }

            if (!databaseRepo.RemoveCustomer(customerId))
            {
                return(false);
            }
            if (!customers.Remove(customer))
            {
                return(false);
            }
            return(true);
        }