Using Unity and interfaces, how do I create a concrete class that implements IDisposable
- by Ryan ONeill
I have an interface (IDbAccess) for a database access class so that I can unit test it using Unity. It all works fine in Unity and now I want to make the concrete database class implement IDisposable so that it closes the db connections.
My problem is that Unity does not understand that my concrete class is disposable because the interface…