The thing is, the Dispose method I'm overriding is from DataAccessAdapterBase, which is in the ORMSupportClasses dll. I didn't think that this could be customized through the templates, can it?
Anyways, my Dispose method looks like this at the moment:
protected override void Dispose(bool isDisposing)
{
// Check if we're in a system transaction with a valid connection scope
if (this.InSystemTransaction && DbConnectionScope.Current != null)
{
// TODO: Dispose everything except the connection...
// Do not call base.Dispose otherwise the connection will be closed
}
else
base.Dispose(isDisposing)
}
The base dispose method has been posted here - http://llblgen.com/TinyForum/Messages.aspx?ThreadID=6656#38373 and it shows all of the objects being disposed... I just want to make sure that the private _physicalTransaction and _systemTransaction objects are being cleaned up properly, but I can't access those fields from my Dispose function.