NHibernate Session-Per-Method-Call via StructureMap Nested Containers(trycatchfail.com)

submitted by Matt_TCFMatt_TCF(946) 5 months, 22 days ago

There are several documented approaches you can follow to implement the session-per-method-call pattern with NHibernate and StructureMap. The majority of these approaches fail to leverage the full capabilities of StrurctureMap and are therefore more complex than they need to be. In this short post, I’ll show you how you can implement a simpler solution by utilizing StructureMap’s nested containers.

2 comments |category: |Views: 69

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by dpetersondpeterson(4397) 5 months, 21 days ago 0

This is a pretty sweet solution, have you considered coming up with a way to package this as a sort of contrib project to NH? The ability to drop something like this into a project via Nuget is just too tantalizing.

Reply

posted by Matt_TCFMatt_TCF(946) 5 months, 21 days ago 0

I hadn't thought about that, but now that you mention it, this would be something that could be packaged up fairly easily. I'd have to do a bit of digging about how to hook the behavior in using a NuGet package, but I know it's doable.

Reply

information Login or create an account to comment on this story