you mean like this
public static void test1(action act) {
act.text="132";
act.user.name="test";
act.result.resulttxt="test";
}
testEntities b = new testEntities();
action act = b.actions.Include("user").Include("result").Where(x => x.id == 9).FirstOrDefault();
test1(act);
b.SaveChanges();
well yes it worked but why i cant attach that entity and save change in the other context