public async Task Post(OrderUploadDto orderDto) { var order = new Order { CreatedAt = DateTimeOffset.Now, ProductId = orderDto.ProductId, Quantity = orderDto.Quantity }; await _repo.Post(order); }
public async Task <ActionResult> Post([FromBody] OrderUploadDto orderDto) { await _ordersService.Post(orderDto); return(Ok()); }