public async Task <IActionResult> New(CustomerSpecification spec) { await this._customers.AddAsync(spec.Name); return(this.RedirectToAction("List")); }
public async Task <ActionResult <CustomerRepresentation> > CreateCustomer([FromBody] CustomerSpecification spec) { var customer = await this._customers.AddAsync(spec.Name); return(this.Ok(CustomerRepresentation.FromEntity(customer))); }
public IActionResult New(CustomerSpecification spec) { this._customers.Add(spec.Name); return(this.RedirectToAction("List")); }