public IActionResult Update(int id, OrderUpdateVM updateVM)
        {
            var order = _query.GetById(id);

            updateVM.Id              = order.Id;
            updateVM.ProductId       = order.ProductId;
            updateVM.CustomerId      = order.CustomerId;
            updateVM.ProductName     = __productService.GetById(order.ProductId).ProductName;
            updateVM.CustomerName    = _customerService.GetById(order.CustomerId).UserName;
            updateVM.BillingAddress  = order.BillingAddress;
            updateVM.ShippingAddress = order.ShippingAddress;
            updateVM.PaymentMethod   = order.PaymentMethod;
            updateVM.OrderStatus     = order.OrderStatus;

            return(View(updateVM));
        }
Example #2
0
        public IActionResult Update(int id)
        {
            var customer = _query.GetById(id);

            return(View(customer));
        }