AspNetCorePostgreSQLDockerApp.Apis.CustomersServiceController.PostCustomer C# (CSharp) 메소드

PostCustomer() 개인적인 메소드

private PostCustomer ( [ customer ) : Task
customer [
리턴 Task
        public async Task<ActionResult> PostCustomer([FromBody]Customer customer)
        {
          if (!ModelState.IsValid) {
            return BadRequest(this.ModelState);
          }

          var newCustomer = await _repo.InsertCustomerAsync(customer);
          if (newCustomer == null) {
            return BadRequest("Unable to insert customer");
          }
          return CreatedAtRoute("GetCustomersRoute", new { id = newCustomer.Id}, newCustomer);
        }