예제 #1
0
        public ActionResult <RemoveOrAddedOrderItemDTO> AddOrderItemByOne(long orderItemId)
        {
            try
            {
                OrderItem oi = _orderItems.GetById(orderItemId);
                oi.AddOne();
                _orderItems.SaveChanges();

                return(new RemoveOrAddedOrderItemDTO(oi.Order, oi));
            }
            catch (ArgumentNullException)
            {
                return(NotFound(new CustomErrorDTO("Order item niet gevonden")));
            }
        }