public IActionResult Post([FromBody] Customer customer)
        {
            var customerId = _businessController.AddCustomer(customer);

            return(CreatedAtRoute("GetCustomer", new { id = customerId }, customer));
        }
Exemplo n.º 2
0
 public bool AddCustomer(Customer newCustomer)
 {
     return(_businessController.AddCustomer(newCustomer));
 }
Exemplo n.º 3
0
 public void AddCustomer_ThrowsNullRefException_WhenCustomerIsNull()
 {
     var exception = Assert.Throws <NullReferenceException>(() => _businessController.AddCustomer(null));
 }