コード例 #1
0
        public async Task <IActionResult> InsertAsync([FromBody] CustomersDTO customer)
        {
            if (customer == null)
            {
                return(BadRequest());
            }

            var response = await _customerApplication.InsertarAsync(customer);

            if (response.IsSuccess)
            {
                return(Ok(response.Data));
            }

            return(BadRequest(response.Message));
        }