Closed luisgizirian closed 8 years ago
Are you hitting the Accounts controller? If so, that one is intentionally not set up to use IoC to illustrate what happens without a container-per-request, so a request to it will indeed cause multiple contexts to be created.
You're right @MattHoneycutt! Sorry about that.
During the PS course, you show how to get a single creation/dispose thanks to the Container-Per-Request pattern.
But, cloning this repo, overriding Dispose (exactly as you show), setting up breakpoints (exactly as you show) and running the site, I get these latter to being hit several times per request.
(although the creation & dispose is correctly balanced)
Am I missing something or there's something going on here?