示例#1
0
        public async Task <IActionResult> Post([FromBody] CreateItemDto createItemDto)
        {
            using (TransactionScope ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                var itemId = await _itemService.Create(createItemDto);

                await _tableService.AddStateTracking <Item>(itemId);

                ts.Complete();
            }
            return(Ok());
        }