Hi c63205,
When you create a new entity its EntityState is Detached.
If you 'link' this new Detached entity to an entity already attached to an EntityManager, (i.e. Added/Modified/Unchanged) the new entity will be automatically added to the EntityManager.
i.e.
var employee = mgr.Employees.First();
Order newOrder = mgr.CreateEntity<Order>(); // newOrder.EntityAspect.EntityState == EntityState.Detached
Order.Employee = employee; // newOrder.EntityAspect.EntityState == EntityState.Added
Note that the above will NOT happen if both entities are not attached to an EntityManager.
I suggest to always explicitly add the entity to an EntityManager.
Regards,
Silvio.