public IActionResult AddOrder([FromBody] OrderViewModel order) { if (order == null) { return(BadRequest()); } if (!ModelState.IsValid) { return(StatusCode(412)); } _pizzaService.AddOrder(order); return(StatusCode(201)); }
public IActionResult AddOrder([FromBody] OrderViewModel order) { if (order == null) { return(BadRequest()); } if (!ModelState.IsValid) { return(StatusCode(412)); } _pizzaService.AddOrder(order); return(StatusCode(201)); }