/// <summary> /// Context utilizado com transação no banco de dados. /// </summary> public static void Clean(object obj) { InSession.Scope <DataLoad <Entities_Principal> >("DBLoad", true); GC.WaitForPendingFinalizers(); GC.SuppressFinalize(obj); GC.Collect(); }
// Protected implementation of Dispose pattern. protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { dataContext.Dispose(); referenceCount--; InSession.Scope <DataLoad <Entities_Principal> >("DBLoad", true); } disposed = true; }