예제 #1
0
        public Task <HttpResponseMessage> Create([FromBody] dynamic body)
        {
            var command = new CreateCustomerCommand();

            var customer = _service.Create(command);

            return(CreateResponse(HttpStatusCode.Created, customer));
        }
예제 #2
0
        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)));
 }