コード例 #1
0
        public async Task <IHttpActionResult> Post(Customer customer)
        {
            if (!this.ModelState.IsValid)
            {
                return(this.BadRequest(this.ModelState));
            }
            customer = await DataContext.AddCustomer(customer.Name);

            return(this.Created(customer));
        }