Using self servicing, look at the following code
var uow = new UnitOfWork();
uow.AddForSave(someEntity, .......
as you press the comma and the intellisense prompts for the next parameter it says it is boolean for 'recursive' save. Defaults to false. Quick look at XML comments shows that:
/// <summary>Adds the passed in entity for saving.</summary>
/// <param name="entityToSave">The entity to save via this unit of work</param>
/// <param name="recurse">When true, it will save all dirty objects referenced (directly or indirectly) by this entity also.</param>
/// <returns>true if the entity is accepted, false if the entity is rejected (already added for a similar action)</returns>
Now, same code, but casting as an IUnitOfWorkCore which it implements:
var uow = (IUnitOfWorkCore) new UnitOfWork();
uow.AddForSave(someEntity, .......
as you press the comma and the intellisense prompts for the next parameter it says it is boolean for 'refetcing' the entity. Defaults to false. Quick look at XML comments shows that:
/// <summary>
/// Adds the passed in entity for saving. No refetching will be applied. Save is recursive.
/// </summary>
/// <param name="toSave">The entity to save via this unit of work</param>
/// <param name="refetch">When true, it will refetch the entity saved after the save action.</param>
/// <returns>true if the entity is accepted, false if the entity is rejected (already added for a similar action)</returns>
We use the interface mostly. So confused by this we tested and it appears the option is for 'recursive' save as it appears to always be refetched.