Ejemplo n.º 1
0
        public MainViewModel()
        {
            SnackMachine snackMachine = new SnackMachineRepository().GetById(1);
            var          viewModel    = new SnackMachineViewModel(snackMachine);

            _dialogService.ShowDialog(viewModel);
        }
        public MainViewModel()
        {
            SnackMachine snackMachine;

            using (ISession session = SessionFactory.OpenSession())
            {
                snackMachine = session.Get <SnackMachine>(1L);
            }
            var viewModel = new SnackMachineViewModel(snackMachine);

            _dialogService.ShowDialog(viewModel);
        }
Ejemplo n.º 3
0
        public MainViewModel()
        {
            var viewModel = new SnackMachineViewModel(new SnackMachine());

            _dialogService.ShowDialog(viewModel);
        }