c# – Generic Update in Repository with inner collection

I trying to do generic repository and I cant make the update function work as I want.
I have 2 classes:

Id,Name,Virtual Collection of BClass

Id,Name,Virtual Reference of Aclass

In my update function I get T of Aclass that contain list of Bclass the code is like this:

    public void Update(T obj)
        _context.Entry(obj).State = EntityState.Modified;

After calling for save function I looking on my db and see that only my AClass object was updated but the list wasnt change at all.

the EntityState of the inner list is “Unchanged” when I want that it will recognize “Added”/”Deleted”/”Modified”

(I get the EF model after deserlization so I dont have it’s EntityState)

I working with EF6 with .NET framework (not core)

Thank for your help