public ViewResult EditProduct(int productId) { var request = new ProductServiceEditProductRequest(productId); ProductServiceEditProductResponse response = _productService.EditProduct(request); return View(response); }
public ProductServiceEditProductResponse EditProduct(ProductServiceEditProductRequest request) { Product product = _unitOfWork.Products.GetAll().FirstOrDefault(p => p.ProductID == request.ProductId); ProductServiceEditProductAdapter productAdapter = new ProductServiceEditProductAdapter(product); ProductServiceEditProductResponse response = productAdapter.Fill(); return response; }