Esempio n. 1
0
        protected override async Task OnInitialization()
        {
            await base.OnInitialization();

            _employeeEditor     = CreateViewModel <IEmployeeEditor>();
            _employeeJobEditor  = CreateViewModel <IEmployeeJobEditor>();
            _employeeRepository = GetRepository <IEmployeeRepository>();
            _employeeRepository.EmployeeJobsChanged += EmployeeJobsChanged;
            EmployeeList = await _employeeRepository.GetItemsWithDetailes().ToAsyncObservableCollection();

            EmployeeList.BindToRepositoryChangesAsync(_employeeRepository,
                                                      async e => await _employeeRepository.GetItemWithDetailes(e.Id),
                                                      e => EmployeeList.First(e.Id));
        }