public async Task <ActionResult> Post([FromBody] CustomerInputModel customer, CancellationToken cancellation) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(await _store.CreateCustomer(customer, cancellation))); }
public IActionResult CreateCustomer(Customer customer) { cs.CreateCustomer(customer); return(Created(customer.FName, customer)); }