Пример #1
0
        protected void Application_EndRequest(object send, EventArgs e)
        {
            CatalogoDataContext context = HttpContext.Current.Items["_EntityContext"] as CatalogoDataContext;

            if (context != null)
            {
                context.Dispose();
            }
        }
Пример #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             context.Dispose();
         }
     }
     this.disposed = true;
 }
 public void Dispose()
 {
     catalogocontext.Dispose();
 }