Flush ISession at the end of request lifecycle
So you want to Flush() at the end of every web request? Of course you do. If you don't require the complexity of Commands, etc then pulling and pushing from your database/store directly in your controllers is fine.
In this example I'm using my IoC container (Autofac) registration for my database session (ISession) to hook in a Flush() just before it's disposed. So easy:
The major value to this is getting to keep fewer persistence lines of code in your controllers. Lighter controllers are always a win in my book.













