Beispiel #1
0
        public IActionResult Put(int id, [FromBody] Customer customer)
        {
            try
            {
                if (id != customer.customerID)
                {
                    return(BadRequest("Parameter ID and owner ID have to be the same"));
                }

                return(Ok(_custRepo.EditCustomer(customer)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }