PhotoEntity.Controllers.Manager.RoleClaimGetAllStrings C# (CSharp) Method

RoleClaimGetAllStrings() public method

public RoleClaimGetAllStrings ( ) : List
return List
        public List<string> RoleClaimGetAllStrings()
        {
            return ds.RoleClaims.OrderBy(r => r.Name).Select(r => r.Name).ToList();
        }

Usage Example

コード例 #1
0
        public ActionResult Register()
        {
            // Claims-aware "Register" method to display an HTML Form
            // Make sure you study the Views/Account/Register.cshtml view code
            // It includes new input elements to gather name and claim data

            // Define your custom role claims here
            // However, in a real-world in-production app, you would likely maintain
            //   a valid list of custom claims in persistent storage somewhere
            Manager m     = new Manager();
            var     roles = m.RoleClaimGetAllStrings();

            // Define a register form
            var form = new RegisterViewModelForm();

            form.RoleList = new MultiSelectList(roles);

            return(View(form));
        }
All Usage Examples Of PhotoEntity.Controllers.Manager::RoleClaimGetAllStrings