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: 
Simple solution is add **ManagerId** as well to the Employee model class and after your line of code that sets IsEngagedwithWork of the employee instance (say emp), do the below thing

`Manager mngr = managers.Select(m => m.ID == emp.ManagerId).FirstOrDefault();`

`if(mngr != null)`  

`mngr.IsAllEmpEngaged = mngr.IsAllEmpEngaged && emp.IsEngagedwithWork;`
I can't say that this is any better, but surely this is a simple and easy way.

Why not just make `IsAllEmpEngaged` a method? You don't even need the `set` property accessor, so a method should suffice.

```
public bool IsAllEmpEngaged()
{
    if (Employees == null)
    {
        // throw error
    }

    return Employees.All(e => e.IsEngagedwithWork);
}

```