public DestinationPresenter(IDestinationView view, ProductModel selectedProduct) { _view = view; SelectedProduct = selectedProduct; _destinationMapper = new DestinationMapper(); _transportMapper = new TransportMapper(); _productMapper = new ProductMapper(); _orderMapper = new OrderMapper(); _orderStatusMapper = new OrderStatusMapper(); _unitOfWork = new UnitOfWork(new ApplicationContext()); destinationService = new DestinationService(_unitOfWork); transportService = new TransportService(_unitOfWork); orderService = new OrderService(_unitOfWork); OrderStatusService = new OrderStatusService(_unitOfWork); destinations = destinationService.GetAllDestinations().Select(dest => _destinationMapper.FromDomainToModel(dest)).ToList(); _view.DisplayData(destinations); _view.DestinationSelected += BeginOrderCreation; }
public DestinationPresenter(IDestinationView view) { _view = view; _bus = new DestinationBUS(); _searchEngine = new SearchEngine <Destination>(); }