public ProductPresenter(IProductView view) { productMapper = new ProductMapper(); deliveryTypeMapper = new DeliveryTypeMapper(); _unitOFWork = new UnitOfWork(new ApplicationContext()); _productService = new ProductService(_unitOFWork); _deliveryTypeService = new DeliveryTypeService(_unitOFWork); deliveryTypes = _deliveryTypeService.GetAllDeliveryTypes().Select(delType => deliveryTypeMapper.FromDomainToModel(delType)).ToList(); products = _productService.GetAllProducts().Select(prod => productMapper.FromDomainToModel(prod)).ToList(); _view = view; _view.DisplayData(deliveryTypes, products); _view.ProductSelected += SelectTheProduct; _view.CategorySelected += RebuildCategoryTable; _view.textChanged += FindByText; _view.parametersChanged += FindByParameters; //this.initialize(); }
public OrderController( UserService userService, OrderService orderService, PaymentMethodService paymentMethodService, DeliveryTypeService deliveryTypeService) { _userService = userService; _orderService = orderService; _paymentMethodService = paymentMethodService; _deliveryTypeService = deliveryTypeService; }
public BookController(BookService bookService, FileService fileService, AuthorService authorService, CategoryService categoryService, DeliveryTypeService deliveryTypeService, PaymentTypeService paymentTypeService, LibraryDbContext context, CartBookService cartBookService, UserService userService) { _bookService = bookService; _fileService = fileService; _authorService = authorService; _categoryService = categoryService; _deliveryTypeService = deliveryTypeService; _paymentTypeService = paymentTypeService; _context = context; _cartBookService = cartBookService; _userService = userService; }
public DeliveryTypeController(DeliveryTypeService deliveryTypeService) { _deliveryTypeService = deliveryTypeService; }