This project is read-only.
1
Vote

PerRequestLiftetimeManager doesn't work when using RenderAction

description

Registering something with the PerRequestLifetimeManager doesn't work if you call RenderAction on a controller.

I have a repository using DB context which is setup using a PerRequestLifetimeManager.

I have a call to a controller which returns a view which then calls back the to controller via RenderAction which makes a calls into my repository, which throws an exception because DbContext has been incorrectly disposed

comments