コード例 #1
0
        public async Task Post(OrderUploadDto orderDto)
        {
            var order = new Order
            {
                CreatedAt = DateTimeOffset.Now,
                ProductId = orderDto.ProductId,
                Quantity  = orderDto.Quantity
            };

            await _repo.Post(order);
        }
コード例 #2
0
        public async Task <ActionResult> Post([FromBody] OrderUploadDto orderDto)
        {
            await _ordersService.Post(orderDto);

            return(Ok());
        }