public async Task <IActionResult> Create([FromBody] UserItem item)
        {
            if (item == null)
            {
                return(BadRequest());
            }

            var result = await _orderItemService.CreateUser(item);

            return(Ok(result));
        }
Exemple #2
0
        public async Task <IActionResult> Create([FromBody] UserItem item)
        {
            if (item == null)
            {
                return(BadRequest());
            }

            await _orderItemService.CreateUser(item);

            return(CreatedAtAction(nameof(GetById), new { id = item.ID }, item));
        }