Example #1
0
 public void Dispose()
 {
     if (ctx != null)
     {
         ctx.Dispose();
     }
 }
Example #2
0
 public void Dispose()
 {
     if (context != null)
     {
         context.Dispose();
     }
 }
Example #3
0
        protected virtual void Dispose(bool disposing)
        {
            lock (this)
            {
                // Do nothing if the object has already been disposed of.
                if (disposed)
                {
                    return;
                }
                if (disposing)
                {
                    // Release disposable objects used by this instance here.
                    if (context != null)
                    {
                        context.Dispose();
                    }
                }

                // Release unmanaged resources here. Don't access reference type fields.

                // Remember that the object has been disposed of.
                disposed = true;
            }
        }