Tag Archives: Disposable

Disposable Instances Series

In the past few weeks I have published a set of four posts that deal with disposable instances. These posts describe in detail a working implementation that automatically disposes all the instances that are no longer needed, in a deterministic … Continue reading

Posted in .NET, Design, Technical | Tagged , , , , | Leave a comment

Disposing Instances when Using Inversion of Control

In the last few posts I have written about how to deal with IDisposable instances when using Dependency Injection. In the Who Disposes Your Repository I talk about the possibilities and challenges of disposing a repository which is injected. Then in the … Continue reading

Posted in .NET, Design, Technical, Training | Tagged , , , , | Leave a comment

Extending Unity Container for IDisposable Instances (2nd approach)

In my previous blog post I detailed an approach of making the Unity Dependency Injection Container to automatically call Dispose() on all the IDisposable instances it builds and injects. The implementation described there, makes use of custom lifetime managers and it … Continue reading

Posted in .NET, Design, Technical, Training | Tagged , , , | Leave a comment

Extending Unity Container for IDisposable Instances (1st approach)

A few weeks ago, in my blog post ‘Who Disposes Your Repository’ I wrote about the challenges of implementing an IDisposable repository, which takes full advantage of the deferred execution of the IQueryable<T> and, which is being injected through Dependency Injection … Continue reading

Posted in .NET, Design, Technical, Training | Tagged , , , | Leave a comment

Who Disposes Your Repository

Recently, I’ve went again through the discussion of how the Repository Pattern works with Dependency Injection (DI) in one of the projects I’m involved in. Even if these patterns are around for a while and there are many examples on … Continue reading

Posted in .NET, Design, Technical | Tagged , , , , , , , , , , | Leave a comment