public ActionResult Edit(int ID) { PermissionsViewModel model = new PermissionsViewModel(); var entity = PermissionsService.Find(ID); model.Name = entity.Name; model.ID = entity.ID; model.Description = entity.Description; model.Action = entity.Action; model.Controller = entity.Controller; model.Namespace = entity.Namespace; model.DepartmentID = entity.DepartmentID; ViewBag.Data_DepartmentID = GetSelectList(entity.DepartmentID); return(View(model)); }