public IActionResult AddCart(Cart cart)
 {
     try
     {
         cartService.AddCart(cart);
         return(CreatedAtAction("AddCart", cart));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
 public IActionResult CustSignUp(Customer customer)
 {
     try
     {
         List <Customer> custs = customerServices.GetAllCustomers();
         if (ValidInvalidServices.ValidEmail(customer.email) == false && validInvalidServices.IsUniqueEmail(customer.email, custs) == false)
         {
             return(StatusCode(409));
         }
         customerServices.AddCustomer(customer);
         Customer newCust = customerServices.GetCustomerByEmail(customer.email);
         Cart     cart    = new Cart();
         cart.custId = newCust.Id;
         cartServices.AddCart(cart);
         return(Ok());
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }