//
        // GET: /AdminYeast/Details/5

        public ActionResult Details(int id)
        {
            var model = new YeastModel
                            {
                                Yeast = _yeastRepository.Get(id)
                            };
            return View(model);
        }
 // public ActionResult Edit(int id, FormCollection collection)
 public ActionResult Edit(YeastModel model)
 {
     if (ModelState.IsValid)
     {
         _yeastRepository.Delete(model.Yeast.Id);
         _yeastRepository.Create(model.Yeast);
         _yeastRepository.Save();
     }
     return RedirectToAction("Index");
 }
 public ActionResult Create(YeastModel model)
 {
     try
     {
         _yeastRepository.Create(model.Yeast);
         _yeastRepository.Save();
     }
     catch
     {
     }
     return RedirectToAction("Index");
 }
        //
        // GET: /AdminYeast/Edit/5
 
        public ActionResult Edit(int id)
        {
            var model = new YeastModel();
            model.Yeast = _yeastRepository.Get(id);
            return View(model);
        }
 public ActionResult Delete(YeastModel model)
 {
     _yeastRepository.Delete(model.Yeast.Id);
     _yeastRepository.Save();
     return RedirectToAction("Index");
 }