Question: This may be trivial. But I could not able to get my heads over this.

```
public class Manager
{
    public int ID { get; set; }
    public List<Employee> Employees { get; set; }
    public bool IsAllEmpEngaged { get; set; }
    public void UpdateIsAllEmpEngaged()
    {
        IsAllEmpEngaged = Employees.All(emp => emp.IsEngagedwithWork == true);
    }

}

public class Employee
{
    public int ID { get; set; }
    public bool IsEngagedwithWork { get; set; }
}

```

So, Whenever, the `IsEngagedwithWork` of `Employee` is setted with some value, I want to check whether all the `Employees` under a`Manager` is Engaged with work or not and update the value of `IsAllEmpEngaged` of the respective `Manager`. 

***I just want to call `UpdateIsAllEmpEngaged` on changes in property `IsEngagedwithWork` of `Employee`. How can I achieve this?***

Any other ways are also welcome.

**Note:** I tried with a having an `event` on `Employee` and attach `Action` from the `Manager` that will callback if any changes in `Employee` property. But I will be having hundreds of `List<Manager>`. I dont want to add event for each and every instance of `Employee` class. Any easy way?

**Update:**
-----------

I am working with WPF MVVM approach, I cannot use direct `get with LinQ` as it will not notify the UI. I have to `set` the property manually for change so that it will `Notify` the UI. 

Also, In actual case, the IsEngagedwithWork will be updated in UI for the property `IsEngagedwithWork`.

Answer: 
I'd use the getter of the property like that

```
 public bool IsAllEmpEngaged { 
   get {
       return (Employees != null) && 
                   Employees.All(e => e.IsEngagedwithWork)
   }
}

```

and you add the following method for the Manager Class

```
 public void NotifyChanged() { OnPropertyChanged(() => IsAllEmpEngaged }

```

then you call it from the Employee Class (assuming you have the managers' list or an equivalent way)

```
private int _ID;
private bool _IsEngagedwithWork;
public int ID { 
     get { return _ID}; 
     set {
       _ID = value;
       OnPropertyChanged(()=>ID );
       notifyMe = managerList.FirstOrDefualt(m => m.ID == _ID);
       if (notifyMe != null) { notifyMe.NotifyChanged()}
     } 
}
public bool IsEngagedwithWork { 
       get { return _IsEngagedwithWork ;} 
       set {
             _IsEngagedwithWork = value;
             OnPropertyChanged(()=>IsEngagedwithWork );
             notifyMe = managerList.FirstOrDefualt(m => m.ID == _ID);
             if (notifyMe != null) { notifyMe.NotifyChanged()}
       } 

```

}
Maybe it work's when you pass your Manager as parameter to Employee and then call your Method if IsEngagedWithWork is set to true.

```
public class Employee
{
    private Manager _parentManager;

    public Employee(Manager parentManager)
    {
        _parentManager=parentManager;
    }

    public int ID { get; set; }

    private bool _isEngangedWithWork;

    public bool IsEngagedwithWork
    { 
       get{ return _isEngangedWithWork; } 
       set
          {
             _isEngangedWithWork=value;
             if(_isEngangedWithWork)
              _parentManager.UpdateIsAllEmpEngaged();
           }
    }
}

```