public ActionResult Create(UserGroupMember usergroupmember)
        {
            if (ModelState.IsValid)
            {
                db.UserGroupMembers.Add(usergroupmember);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.User_id = new SelectList(db.Users, "User_id", "UserName", usergroupmember.User_id);
            ViewBag.UserGroup_id = new SelectList(db.UserGroups, "UserGroup_id", "GroupName", usergroupmember.UserGroup_id);
            return View(usergroupmember);
        }
 public ActionResult Edit(UserGroupMember usergroupmember)
 {
     if (ModelState.IsValid)
     {
         db.Entry(usergroupmember).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.User_id = new SelectList(db.Users, "User_id", "UserName", usergroupmember.User_id);
     ViewBag.UserGroup_id = new SelectList(db.UserGroups, "UserGroup_id", "GroupName", usergroupmember.UserGroup_id);
     return View(usergroupmember);
 }