Exemplo n.º 1
0
        public async Task <IActionResult> Create([FromBody] ItemDtoCreate dtoCreate)
        {
            _logger.LogDebug($"Method {nameof(Create)}");
            var response = await _shopService.CreateItem(dtoCreate);

            return(Ok(response));
        }
        public async Task <ActionResult <T> > CreateItem(T item)
        {
            _service.CreateItem(item);
            await _service.SaveAsync();

            return(CreatedAtAction("GetItem", new { id = item.Id }, item));
        }