Typically you want to use ``using`` to create a local ``IDisposable`` variable; it will trigger disposal of the object when control passes out of the block's scope. The exception to this rule is when your method returns that ``IDisposable``. In that case ``using`` disposes of the object before the caller can make use of it, likely causing exceptions at runtime. So you should either remove ``using`` or avoid returning the ``IDisposable``.