public ActionResult Index() { var entity = new AspNetSecurityModuleViewModel(); MapDropDownList(entity); ViewBag.Projects = securityService.GetAllProject(SessionHelper.LoggedIn_RoleId, "0"); return(View(entity)); }
public void MapDropDownList(AspNetSecurityModuleViewModel model) { //Designation var rolenList = aspNetRoleService.GetAll(); var roleDetails = rolenList.Select(m => new SelectListItem() { Text = string.Format("{0}", m.Name), Value = m.Id.ToString() }); model.RoleList = roleDetails; var RoleList = new List <SelectListItem>(); RoleList.Add(new SelectListItem() { Text = "Please Select", Value = "" }); RoleList.AddRange(roleDetails); model.RoleList = RoleList; }