public void Dispose() { this.IsDisposed = true; importRepo.Dispose(); ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["PrismDatabase"]; HibernateUtil.Initialize(settings.ConnectionString, false); }
//// GET: PriceRules/Delete/5 //public ActionResult Delete(int? id) //{ // if (id == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // PriceRule priceRule = db.PriceRules.Find(id); // if (priceRule == null) // { // return HttpNotFound(); // } // return View(priceRule); //} //// POST: PriceRules/Delete/5 //[HttpPost, ActionName("Delete")] //[ValidateAntiForgeryToken] //public ActionResult DeleteConfirmed(int id) //{ // PriceRule priceRule = db.PriceRules.Find(id); // db.PriceRules.Remove(priceRule); // db.SaveChanges(); // return RedirectToAction("Index"); //} protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }