public Task <HttpResponseMessage> Create([FromBody] dynamic body) { var command = new CreateCustomerCommand(); var customer = _service.Create(command); return(CreateResponse(HttpStatusCode.Created, customer)); }
public async Task <IActionResult> PostCustomer([FromBody] CustomerDto customer) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var customerCreated = await _customerApplicationService.Create(customer); return(Ok(customerCreated)); }
public IActionResult Create([FromBody] CreateCustomerDto item) { return(Ok(_customerApplicationService.Create(item))); }