コード例 #1
0
        public IActionResult AddMenuItem([FromBody] MenuItemViewModel menuItem)
        {
            if (menuItem == null)
            {
                return(BadRequest());
            }
            if (!ModelState.IsValid)
            {
                return(StatusCode(412));
            }

            _pizzaService.AddMenuItem(menuItem);


            return(StatusCode(201));
        }