SofiaCarRental example and BusyIndicator

2 posts, 0 answers
  1. Art Kedzierski
    Art Kedzierski avatar
    107 posts
    Member since:
    Nov 2009

    Posted 02 Jul 2013 Link to this post

    I'm building a scheduling app that is structured along the lines of your SofiaCarRental example using MVVM and a WCF connection to a SQL database. I'm trying to figure out where I would insert code to trigger a busy indicator for the various repository data operations. For example, when Car and look-up repositories are initially loaded and when appointments for a selected Car are loaded and updated.

    I seen a few discussions about BackgroundWorker, but the example is so modularized I'm not sure where I would (or even could) attach an appropriate process.
  2. Art Kedzierski
    Art Kedzierski avatar
    107 posts
    Member since:
    Nov 2009

    Posted 02 Jul 2013 Link to this post

    I figured it out. I wasn't holding my mouth the right way, apparently. Here's an example:

    using (EquipmentRepository equipmentRepository = RepositoryFactory.Instance.CreateEquipmentRepository())
    {
        this.EquipmentIsBusy = true;
        equipmentRepository.GetEquipment((entitiesOfEquipment) =>
        {
            this.Equipment = new ObservableCollection<Web.Resource>(entitiesOfEquipment.OrderBy(o => o.Name));
            this.EquipmentIsBusy = false;
        });
    }
  3. DevCraft banner
Back to Top