GetAllRoles() public method

public GetAllRoles ( ) : string[]
return string[]
Exemplo n.º 1
0
        public ActionResult AddEmployee()
        {
            CodeFirstRoleProvider roleProvider = new CodeFirstRoleProvider();
            //SqlParameter appIdParam = new SqlParameter("@ApplicationId","/");
            List <string> roles = roleProvider.GetAllRoles().ToList(); //context.Database.SqlQuery<string>("dbo.aspnet_Roles_GetAllRoles @ApplicationId", appIdParam).ToList<string>();

            ViewBag.Roles = roles;
            ViewBag.Teams = teamRepository.All;
            return(View());
        }
Exemplo n.º 2
0
        public static string[] GetAllRoles()
        {
            CodeFirstRoleProvider rp = new CodeFirstRoleProvider();

            return(rp.GetAllRoles());
        }