Skip to content

Instantly share code, notes, and snippets.

@khellang
Last active December 21, 2015 23:39
Show Gist options
  • Save khellang/6383620 to your computer and use it in GitHub Desktop.
Save khellang/6383620 to your computer and use it in GitHub Desktop.
if (!pipelines.AfterRequest.PipelineItems.Any(x => x.Name.Equals(SaveAndDisposeItemName)))
{
pipelines.AfterRequest.AddItemToEndOfPipeline(
new PipelineItem<Action<NancyContext>>(
SaveAndDisposeItemName,
ctx => DisposeSession(container)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment