protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
        // GET: Tuotteet

        public ActionResult Index()
        {
            ViewBag.Haku = "Tuotehaku";
            TilausDb3Entities db    = new TilausDb3Entities();
            List <Tuotteet>   model = db.Tuotteet.ToList();

            //return View(db.Tuotteet.ToList());
            db.Dispose();
            return(View(model));
        }