public ActionResult DeleteConfirmed(int id)
        {
            BarberDetail barberDetail = db.BarberDetails.Find(id);

            db.BarberDetails.Remove(barberDetail);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "BarberID,PhoneNumber,OperationHours,DaysOfWeek,PolicyInfo")] BarberDetail barberDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(barberDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BarberID = new SelectList(db.Barbers, "BarberID", "FirstName", barberDetail.BarberID);
     return(View(barberDetail));
 }
        // GET: BarberDetails/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BarberDetail barberDetail = db.BarberDetails.Find(id);

            if (barberDetail == null)
            {
                return(HttpNotFound());
            }
            return(View(barberDetail));
        }
        // GET: BarberDetails/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BarberDetail barberDetail = db.BarberDetails.Find(id);

            if (barberDetail == null)
            {
                return(HttpNotFound());
            }
            ViewBag.BarberID = new SelectList(db.Barbers, "BarberID", "FirstName", barberDetail.BarberID);
            return(View(barberDetail));
        }