public ActionResult DeleteConfirmed(int id)
        {
            brewery brewery = db.breweries.Find(id);

            db.breweries.Remove(brewery);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "breweryID,breweryLocation,breweryName,features")] brewery brewery)
 {
     if (ModelState.IsValid)
     {
         db.Entry(brewery).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(brewery));
 }
        public ActionResult Create([Bind(Include = "breweryID,breweryLocation,breweryName,features")] brewery brewery)
        {
            if (ModelState.IsValid)
            {
                db.breweries.Add(brewery);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(brewery));
        }
        // GET: breweries/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            brewery brewery = db.breweries.Find(id);

            if (brewery == null)
            {
                return(HttpNotFound());
            }
            return(View(brewery));
        }