RavenDB Session mManagement in the ASP.NET Web API
Join the DZone community and get the full member experience.Join For Free
this was brought up in the mailing list, and i thought it was an interesting solution, therefore, this post.
a couple of things to note here. i would actually rather use the initialize() / dispose() methods for this, but the problem is that we don’t really have a way at the dispose() to know if the action threw an exception. hence, the need to capture the executeasync() operation.
for fun, you can also use the async session as well, which will integrate very nicely into the async nature of most of the web api.
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.