public CommentController(IUserService userService) { this.userService = userService; this.userDAO = new UserDAO(); this.product2DAO = new Product2DAO(); this.commentDAO = new CommentDAO(); }
public CustomOrderItem toCustomOrderItem(OrderItemEntity orderItemEntity) { CustomOrderItem csi = new CustomOrderItem(); Product2DAO product2DAO = new Product2DAO(); csi.productID = orderItemEntity.ProductId; Product2 productItem = product2DAO.getProduct(csi.productID); //csi.productImg = productItem.Images[0].Image; csi.productName = productItem.Name; csi.pricePerOne = (double)productItem.OriginalPrice; csi.quatity = orderItemEntity.Quantity; csi.priceAll = csi.computePriceAllByProduct(); return(csi); }
public TestRest(Product2DAO productDAO) { this.productDAO = productDAO; }
public CartREST() { this.paymentDAO = new PaymentDAO(); this.cartDAO = new CartDAO(); this.product2DAO = new Product2DAO(); }
public ProductRest() { this.ProductDAO = new Product2DAO(); this.commentDAO = new CommentDAO(); }
public OrderREST() { this.paymentDAO = new PaymentDAO(); this.orderDAO = new OrderDAO(); this.product2DAO = new Product2DAO(); }