I create a client-server application in VB.NET 2010 with EF 4.x STEs.
If i change the Entity the State is setting correct. But I if I change a sub-item, then the Entity-State is not changed - only of the SubItem.
How I must modified the tt-Templates so "see" changes in the whole entity-graph?
That is the correct behavior. Otherwise any change in entity would propagate modification flag into whole entity graph if navigation properties are bidirectional. The State is not for you to understand if something has changed but for EF to understand what exactly has changed to generate correct SQL commands.