Hi Kijana,
Yes that's another thought that came in mind - Maybe decorate such methods with an Aspect (using Postsharp), say [ShouldOnlyExecuteOneRequest]. Then, the aspect would check the method variables for an IDocumentSession, see how many requests it had before the method started, and see how many it had after it started. If there is more than 1, it would throw an error.
Basically I wanted to know if there were any "proper" ways to do this, rather than rolling your own solution as I didn't want to reinvent the wheel. However it seems that is the way forward.
Another logic I do is I don't use the session.Load directly, but always pass it through another extension method (GetById(this session)) which always expects the item to be pre-loaded in session. Then, I have to specifically pass as parameter that this is not expected to be in session. This way, it lets one stop and think about including.
However, a big issue i'm facing is that in TDD, session etc are mocked - Hence, this is something which only crops up at run-time when using the actual system, not during the unit-testing stage.
Regards,
Karl