Beispiel #1
0
        public IActionResult AddOrder([FromBody] OrderFormDto orderFormDto)
        {
            var userId   = _userManager.GetUserIdAsInt(User);
            var orderDto = _orderAppService.Add(userId, orderFormDto);

            return(StatusCode(StatusCodes.Status201Created, orderDto));
        }
        public async Task <IActionResult> Add(OrderInsertViewModel order)
        {
            _logger.LogDebug("INSERT order");
            var result = await _service.Add(order);

            return(Ok(result));
        }
Beispiel #3
0
        public async Task <AjaxResponse <bool> > Add([FromBody] OrderCreateInput dto)
        {
            var res = await _appservice.Add(dto);

            return(new AjaxResponse <bool>(res));
        }
Beispiel #4
0
 public IActionResult Post([FromBody] IEnumerable <ProductOrderViewModel> productsOrder)
 {
     return(Response(_orderAppService.Add(productsOrder)));
 }