Example #1
0
        public async Task <ActionResult <ItemDto> > Post([FromBody] ItemCreateDto itemCreate)
        {
            Item item = _mapper.Map <Item>(itemCreate);

            _itemGroupRepository.Create(item);
            await _itemGroupRepository.Save();

            return(CreatedAtRoute("GetItemGroup", new { id = item.Id }, item));
        }