public ActionResult DeleteConfirmed(int id)
        {
            AccessAuthorities accessAuthorities = db.AccessAuthorities.Find(id);

            db.AccessAuthorities.Remove(accessAuthorities);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: AccessAuthorities
        public ActionResult Index()
        {
            AccessAuthorities auth = new AccessAuthorities();

            auth.pathID = 1;

            return(View(db.AccessAuthorities.ToList()));
        }
        // GET: AccessAuthorities/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AccessAuthorities accessAuthorities = db.AccessAuthorities.Find(id);

            if (accessAuthorities == null)
            {
                return(HttpNotFound());
            }
            return(View(accessAuthorities));
        }
        public ActionResult Edit([Bind(Include = "ID,pathID,roleID")] AccessAuthorities accessAuthorities)
        {
            if (accessAuthorities.pathID > 0 && accessAuthorities.roleID > 0 && accessAuthorities.ID > 0)
            {
                string currentuser = !string.IsNullOrEmpty(User?.Identity?.Name) ? User.Identity.Name.ToUpper() : "Anonymous";
                currentuser = currentuser.Substring(currentuser.IndexOf('\\') + 1).Replace("\\", "").ToUpper();

                accessAuthorities.modifier     = currentuser;
                accessAuthorities.modifieddate = DateTime.UtcNow;

                db.Entry(accessAuthorities).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(accessAuthorities));
        }